aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-08-28 14:24:49 +0100
committerChris Michael <cp.michael@samsung.com>2013-08-28 14:26:06 +0100
commit01c42920f2cec90b7e9ebdfe7134f725950883e8 (patch)
tree1fa3728ab82695fbf5ef56cd5a00b801bcb7e557 /legacy/elementary
parentelm_bg: added a color reset feature. (diff)
downloadefl-01c42920f2cec90b7e9ebdfe7134f725950883e8.tar.gz
Fix mike's "move pointer" problem with elm apps inside wayland-only.
On a move start signal, set the mouse cursor to "move". Add hook for "move stop" to unset cursor. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elm_win.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 0c7c83b222..0cef40d130 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -2136,11 +2136,21 @@ static void
_elm_win_frame_cb_move_start(void *data,
Evas_Object *obj __UNUSED__,
const char *sig __UNUSED__,
- const char *source __UNUSED__)
+ const char *source)
{
ELM_WIN_DATA_GET(data, sd);
if (!sd) return;
+
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ if (!strcmp(source, "elm"))
+ ecore_wl_window_cursor_from_name_set(sd->wl.win, ELM_CURSOR_HAND1);
+ else
+ ecore_wl_window_cursor_default_restore(sd->wl.win);
+#else
+ (void)source;
+#endif
+
/* FIXME: Change mouse pointer */
/* NB: Wayland handles moving surfaces by itself so we cannot
@@ -2152,6 +2162,21 @@ _elm_win_frame_cb_move_start(void *data,
ecore_evas_wayland_move(sd->ee, sd->screen.x, sd->screen.y);
}
+static void
+_elm_win_frame_cb_move_stop(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *sig __UNUSED__,
+ const char *source __UNUSED__)
+{
+ ELM_WIN_DATA_GET(data, sd);
+
+ if (!sd) return;
+
+#ifdef HAVE_ELEMENTARY_WAYLAND
+ ecore_wl_window_cursor_default_restore(sd->wl.win);
+#endif
+}
+
#ifdef HAVE_ELEMENTARY_WAYLAND
struct _resize_info
{
@@ -2436,6 +2461,9 @@ _elm_win_frame_add(Elm_Win_Smart_Data *sd,
(sd->frame_obj, "elm,action,move,start", "elm",
_elm_win_frame_cb_move_start, obj);
edje_object_signal_callback_add
+ (sd->frame_obj, "elm,action,move,stop", "elm",
+ _elm_win_frame_cb_move_stop, obj);
+ edje_object_signal_callback_add
(sd->frame_obj, "elm,action,resize,show", "*",
_elm_win_frame_cb_resize_show, obj);
edje_object_signal_callback_add
@@ -2485,6 +2513,9 @@ _elm_win_frame_del(Elm_Win_Smart_Data *sd)
(sd->frame_obj, "elm,action,move,start", "elm",
_elm_win_frame_cb_move_start);
edje_object_signal_callback_del
+ (sd->frame_obj, "elm,action,move,stop", "elm",
+ _elm_win_frame_cb_move_stop);
+ edje_object_signal_callback_del
(sd->frame_obj, "elm,action,resize,show", "*",
_elm_win_frame_cb_resize_show);
edje_object_signal_callback_del