summaryrefslogtreecommitdiff
path: root/src/lib
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
commitc4cf7da2ad210550a92a62c8399ec38cb1816aaf (patch)
treec2915968ec277c1142c96af8d579f3472be82f1c /src/lib
parent0d70f195a29458569455d5f3bf6ead59b85ea9d9 (diff)
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 T502 Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_win.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 25925d866..d401eaee4 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1691,6 +1691,32 @@ _elm_win_xwindow_get(Elm_Win_Smart_Data *sd)
1691} 1691}
1692#endif 1692#endif
1693 1693
1694Ecore_Wl_Window *
1695_elm_ee_wlwin_get(const Ecore_Evas *ee)
1696{
1697#ifdef HAVE_ELEMENTARY_WAYLAND
1698 Ecore_Wl_Window *win = NULL;
1699
1700 if (!ee) return NULL;
1701 if ((EE_ENGINE_COMPARE(ee, ELM_WAYLAND_SHM)) ||
1702 (EE_ENGINE_COMPARE(ee, ELM_WAYLAND_EGL)))
1703 {
1704 if (ee) win = ecore_evas_wayland_window_get(ee);
1705 }
1706 return win;
1707
1708#endif
1709 return NULL;
1710}
1711
1712#ifdef HAVE_ELEMENTARY_WAYLAND
1713static void
1714_elm_win_wlwindow_get(Elm_Win_Smart_Data *sd)
1715{
1716 sd->wl.win = _elm_ee_wlwin_get(sd->ee);
1717}
1718#endif
1719
1694#ifdef HAVE_ELEMENTARY_X 1720#ifdef HAVE_ELEMENTARY_X
1695static void 1721static void
1696_elm_win_xwin_update(Elm_Win_Smart_Data *sd) 1722_elm_win_xwin_update(Elm_Win_Smart_Data *sd)
@@ -3028,7 +3054,7 @@ _win_constructor(Eo *obj, void *_pd, va_list *list)
3028 3054
3029#ifdef HAVE_ELEMENTARY_WAYLAND 3055#ifdef HAVE_ELEMENTARY_WAYLAND
3030 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL))) 3056 if ((ENGINE_COMPARE(ELM_WAYLAND_SHM)) || (ENGINE_COMPARE(ELM_WAYLAND_EGL)))
3031 sd->wl.win = ecore_evas_wayland_window_get(sd->ee); 3057 _elm_win_wlwindow_get(sd);
3032#endif 3058#endif
3033 3059
3034 if ((_elm_config->bgpixmap) 3060 if ((_elm_config->bgpixmap)
@@ -5383,7 +5409,7 @@ elm_win_wl_window_get(const Evas_Object *obj)
5383 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY)) 5409 if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
5384 { 5410 {
5385 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); 5411 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
5386 return ecore_evas_wayland_window_get(ee); 5412 return _elm_ee_wlwin_get(ee);
5387 } 5413 }
5388 5414
5389 ELM_WIN_CHECK(obj) NULL; 5415 ELM_WIN_CHECK(obj) NULL;
@@ -5393,7 +5419,7 @@ elm_win_wl_window_get(const Evas_Object *obj)
5393} 5419}
5394 5420
5395static void 5421static void
5396_wl_window_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) 5422_wl_window_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5397{ 5423{
5398 Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **); 5424 Ecore_Wl_Window **ret = va_arg(*list, Ecore_Wl_Window **);
5399#if HAVE_ELEMENTARY_WAYLAND 5425#if HAVE_ELEMENTARY_WAYLAND
@@ -5460,7 +5486,7 @@ elm_win_floating_mode_get(const Evas_Object *obj)
5460} 5486}
5461 5487
5462static void 5488static void
5463_window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) 5489_window_id_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5464{ 5490{
5465 Ecore_Window *ret = va_arg(*list, Ecore_Window *); 5491 Ecore_Window *ret = va_arg(*list, Ecore_Window *);
5466 Elm_Win_Smart_Data *sd = _pd; 5492 Elm_Win_Smart_Data *sd = _pd;