aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-30 10:58:55 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-30 10:58:55 -0500
commitbfd221e6101b6502b4fca04a540eee1e7bc7eb37 (patch)
tree805d0e2a003c5746ccb8da4220df11758445cb3a /src/lib/elementary/efl_ui_win.c
parentmem gadget: document all the values received in the edje message (diff)
downloadefl-bfd221e6101b6502b4fca04a540eee1e7bc7eb37.tar.gz
elementary: Don't set wayland window pointer if pointer ee not visible
This small patch avoids resetting ecore_wl2_window_pointer (and thus wl_pointer_set_cursor) if the actual pointer canvas is not visible. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index e76c73b086..24d8ae23fb 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -125,6 +125,7 @@ struct _Efl_Ui_Win_Data
Ecore_Evas *ee;
Evas_Object *obj, *hot_obj;
int hot_x, hot_y;
+ Eina_Bool visible : 1;
} pointer;
struct
{
@@ -951,6 +952,7 @@ _elm_win_mouse_in(Ecore_Evas *ee)
#ifdef HAVE_ELEMENTARY_WL2
if ((sd->wl.win) && (sd->pointer.ee))
{
+ sd->pointer.visible = EINA_TRUE;
ecore_evas_show(sd->pointer.ee);
sd->pointer.surf = ecore_wl2_window_surface_get(sd->pointer.win);
ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
@@ -968,6 +970,7 @@ _elm_win_mouse_out(Ecore_Evas *ee)
#ifdef HAVE_ELEMENTARY_WL2
if ((sd->wl.win) && (sd->pointer.ee))
{
+ sd->pointer.visible = EINA_FALSE;
ecore_evas_hide(sd->pointer.ee);
ecore_wl2_window_pointer_set(sd->wl.win, NULL,
sd->pointer.hot_x, sd->pointer.hot_y);
@@ -3080,7 +3083,7 @@ _elm_win_wl_cursor_set(Evas_Object *obj, const char *cursor)
sd->pointer.hot_y = hy;
}
- if ((sd->wl.win) && (sd->pointer.surf))
+ if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
sd->pointer.hot_x, sd->pointer.hot_y);
}
@@ -3817,7 +3820,7 @@ _elm_win_frame_cb_resize_show(void *data,
if (ri) _elm_theme_object_set(sd->obj, sd->pointer.obj, "pointer", "base", ri->cursor);
}
- if ((sd->wl.win) && (sd->pointer.surf))
+ if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
sd->pointer.hot_x, sd->pointer.hot_y);
#else
@@ -3841,7 +3844,7 @@ _elm_win_frame_cb_resize_hide(void *data,
_elm_theme_object_set(sd->obj, sd->pointer.obj,
"pointer", "base", "default");
- if ((sd->wl.win) && (sd->pointer.surf))
+ if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
sd->pointer.hot_x, sd->pointer.hot_y);
#endif
@@ -3960,7 +3963,7 @@ _elm_win_frame_cb_move_stop(void *data,
_elm_theme_object_set(sd->obj, sd->pointer.obj,
"pointer", "base", "default");
- if ((sd->wl.win) && (sd->pointer.surf))
+ if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
sd->pointer.hot_x, sd->pointer.hot_y);
#endif