aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2012-06-06 13:55:15 +0000
committerChristopher Michael <cpmichael1@comcast.net>2012-06-06 13:55:15 +0000
commit8ae0fe2422d96a47c23c29013fa24e68f23c4b46 (patch)
tree1497753cc0d7508be62128d2a402923492d45f78 /legacy/elementary/src/lib/elm_win.c
parentElm: Update ChangeLog for Rob's patch. (diff)
downloadefl-8ae0fe2422d96a47c23c29013fa24e68f23c4b46.tar.gz
Elm: Patches from Rob Bradford <rob@linux.intel.com> to:
* Move X related window items into their own substruct of _Elm_Win_Smart_Data to allow grouping based on engine. * Move X related cursor items into their own substruct of Elm_Cursor to make supporting cursors on other platforms cleaner. * Add support for setting the cursor under Wayland: * Introduce a configure option and #define to as per other engines * Add always-built API function to allow identification of running under Wayland (like for X11) * Call into Ecore to set the cursor when the mouse enters the desired widget. SVN revision: 71754
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 7e4ece0718..11b14a3ef8 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -50,6 +50,13 @@ struct _Elm_Win_Smart_Data
Ecore_Event_Handler *client_message_handler;
} x;
#endif
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ struct
+ {
+ Ecore_Wl_Window *win;
+ } wl;
+#endif
+
Ecore_Job *deferred_resize_job;
Ecore_Job *deferred_child_eval_job;
@@ -2146,6 +2153,10 @@ elm_win_add(Evas_Object *parent,
_elm_win_xwindow_get(sd);
#endif
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ sd->wl.win = ecore_evas_wayland_window_get(sd->ee);
+#endif
+
if ((_elm_config->bgpixmap) && (!_elm_config->compositing))
ecore_evas_avoid_damage_set(sd->ee, ECORE_EVAS_AVOID_DAMAGE_EXPOSE);
// bg pixmap done by x - has other issues like can be redrawn by x before it
@@ -3384,3 +3395,24 @@ elm_win_xwindow_get(const Evas_Object *obj)
#endif
return 0;
}
+
+EAPI Ecore_Wl_Window *
+elm_win_wl_window_get(const Evas_Object *obj)
+{
+ if (!obj) return NULL;
+
+ if (!evas_object_smart_type_check_ptr(obj, WIN_SMART_NAME))
+ {
+ Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
+ return ecore_evas_wayland_window_get(ee);
+ }
+
+ ELM_WIN_CHECK(obj) NULL;
+ ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
+#if HAVE_ELEMENTARY_WAYLAND
+ if (sd->wl.win) return sd->wl.win;
+ if (sd->parent) return elm_win_wl_window_get(sd->parent);
+#endif
+ return NULL;
+}
+