summaryrefslogtreecommitdiff
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
parent07b6699293402491b53d150adc2727ffc88ca906 (diff)
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>
-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
125 Ecore_Evas *ee; 125 Ecore_Evas *ee;
126 Evas_Object *obj, *hot_obj; 126 Evas_Object *obj, *hot_obj;
127 int hot_x, hot_y; 127 int hot_x, hot_y;
128 Eina_Bool visible : 1;
128 } pointer; 129 } pointer;
129 struct 130 struct
130 { 131 {
@@ -951,6 +952,7 @@ _elm_win_mouse_in(Ecore_Evas *ee)
951#ifdef HAVE_ELEMENTARY_WL2 952#ifdef HAVE_ELEMENTARY_WL2
952 if ((sd->wl.win) && (sd->pointer.ee)) 953 if ((sd->wl.win) && (sd->pointer.ee))
953 { 954 {
955 sd->pointer.visible = EINA_TRUE;
954 ecore_evas_show(sd->pointer.ee); 956 ecore_evas_show(sd->pointer.ee);
955 sd->pointer.surf = ecore_wl2_window_surface_get(sd->pointer.win); 957 sd->pointer.surf = ecore_wl2_window_surface_get(sd->pointer.win);
956 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf, 958 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
@@ -968,6 +970,7 @@ _elm_win_mouse_out(Ecore_Evas *ee)
968#ifdef HAVE_ELEMENTARY_WL2 970#ifdef HAVE_ELEMENTARY_WL2
969 if ((sd->wl.win) && (sd->pointer.ee)) 971 if ((sd->wl.win) && (sd->pointer.ee))
970 { 972 {
973 sd->pointer.visible = EINA_FALSE;
971 ecore_evas_hide(sd->pointer.ee); 974 ecore_evas_hide(sd->pointer.ee);
972 ecore_wl2_window_pointer_set(sd->wl.win, NULL, 975 ecore_wl2_window_pointer_set(sd->wl.win, NULL,
973 sd->pointer.hot_x, sd->pointer.hot_y); 976 sd->pointer.hot_x, sd->pointer.hot_y);
@@ -3080,7 +3083,7 @@ _elm_win_wl_cursor_set(Evas_Object *obj, const char *cursor)
3080 sd->pointer.hot_y = hy; 3083 sd->pointer.hot_y = hy;
3081 } 3084 }
3082 3085
3083 if ((sd->wl.win) && (sd->pointer.surf)) 3086 if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
3084 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf, 3087 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
3085 sd->pointer.hot_x, sd->pointer.hot_y); 3088 sd->pointer.hot_x, sd->pointer.hot_y);
3086} 3089}
@@ -3817,7 +3820,7 @@ _elm_win_frame_cb_resize_show(void *data,
3817 if (ri) _elm_theme_object_set(sd->obj, sd->pointer.obj, "pointer", "base", ri->cursor); 3820 if (ri) _elm_theme_object_set(sd->obj, sd->pointer.obj, "pointer", "base", ri->cursor);
3818 } 3821 }
3819 3822
3820 if ((sd->wl.win) && (sd->pointer.surf)) 3823 if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
3821 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf, 3824 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
3822 sd->pointer.hot_x, sd->pointer.hot_y); 3825 sd->pointer.hot_x, sd->pointer.hot_y);
3823#else 3826#else
@@ -3841,7 +3844,7 @@ _elm_win_frame_cb_resize_hide(void *data,
3841 _elm_theme_object_set(sd->obj, sd->pointer.obj, 3844 _elm_theme_object_set(sd->obj, sd->pointer.obj,
3842 "pointer", "base", "default"); 3845 "pointer", "base", "default");
3843 3846
3844 if ((sd->wl.win) && (sd->pointer.surf)) 3847 if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
3845 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf, 3848 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
3846 sd->pointer.hot_x, sd->pointer.hot_y); 3849 sd->pointer.hot_x, sd->pointer.hot_y);
3847#endif 3850#endif
@@ -3960,7 +3963,7 @@ _elm_win_frame_cb_move_stop(void *data,
3960 _elm_theme_object_set(sd->obj, sd->pointer.obj, 3963 _elm_theme_object_set(sd->obj, sd->pointer.obj,
3961 "pointer", "base", "default"); 3964 "pointer", "base", "default");
3962 3965
3963 if ((sd->wl.win) && (sd->pointer.surf)) 3966 if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
3964 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf, 3967 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
3965 sd->pointer.hot_x, sd->pointer.hot_y); 3968 sd->pointer.hot_x, sd->pointer.hot_y);
3966#endif 3969#endif