aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-11-15 10:14:08 +0000
committerChris Michael <cp.michael@samsung.com>2013-11-15 10:16:00 +0000
commita43489f6dea5ce4bc0e216e29fd666e076fc2063 (patch)
tree7a7d7df3664cfb6fa4374a6bdcae5b67c4de9f35 /legacy/elementary/src/lib/elm_win.c
parentFix formatting (diff)
downloadefl-a43489f6dea5ce4bc0e216e29fd666e076fc2063.tar.gz
Make routines to get the wayland window from an ecore_evas be more
inline with their X counterparts. Also, remove some EINA_UNUSED where parameters were being used. The previous code to get the Ecore_Wl_Window from an Ecore_Evas did not check to make sure the Ecore_Evas Engine was a wayland engine, and thus elm_tests like Window Inline would spew CRIT & ERR messages from ecore_evas about the interface. This fixes Phab Ticket https://phab.enlightenment.org/T502 Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 25925d8668..d401eaee4c 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -1691,6 +1691,32 @@ _elm_win_xwindow_get(Elm_Win_Smart_Data *sd)
}
#endif
+Ecore_Wl_Window *
+_elm_ee_wlwin_get(const Ecore_Evas *ee)
+{
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ Ecore_Wl_Window *win = NULL;
+
+ if (!ee) return NULL;
+ if ((EE_ENGINE_COMPARE(ee, ELM_WAYLAND_SHM)) ||
+ (EE_ENGINE_COMPARE(ee, ELM_WAYLAND_EGL)))
+ {
+ if (ee) win = ecore_evas_wayland_window_get(ee);
+ }
+ return win;
+
+#endif
+ return NULL;
+}
+
+#ifdef HAVE_ELEMENTARY_WAYLAND
+static void
+_elm_win_wlwindow_get(Elm_Win_Smart_Data *sd)
+{
+ sd->wl.win = _elm_ee_wlwin_get(sd->ee);
+}
+#endif
+
#ifdef HAVE_ELEMENTARY_X
static void
_elm_win_xwin_update(Elm_Win_Smart_Data *sd)
@@ -3028,7 +3054,7 @@ _win_constructor(Eo *obj, void *_pd, va_list *list)
#ifdef HAVE_ELEMENTARY_WAYLAND
if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
- sd->wl.win = ecore_evas_wayland_window_get(sd->ee);
+ _elm_win_wlwindow_get(sd);
#endif
if ((_elm_config->bgpixmap)
@@ -5383,7 +5409,7 @@ elm_win_wl_window_get(const Evas_Object *obj)
if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
{
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
- return ecore_evas_wayland_window_get(ee);
+ return _elm_ee_wlwin_get(ee);
}
ELM_WIN_CHECK(obj) NULL;
@@ -5393,7 +5419,7 @@ elm_win_wl_window_get(const Evas_Object *obj)
}
static void
-_wl_window_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+_wl_window_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **);
#if HAVE_ELEMENTARY_WAYLAND
@@ -5460,7 +5486,7 @@ elm_win_floating_mode_get(const Evas_Object *obj)
}
static void
-_window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+_window_id_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
Ecore_Window *ret = va_arg(*list, Ecore_Window *);
Elm_Win_Smart_Data *sd = _pd;