summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-30 12:59:29 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-30 12:59:29 -0500
commit4697d0c2b3c27cfb31d88918ac3f5d615ff9d541 (patch)
tree5a6cbc9973ca91572088545b764ec5aa4b41ea56
parentd485a116d34ac03adee360f4cddea5f99a969e12 (diff)
elementary: Ensure pointer hotspot update and reduce duplicated code
When we mouse_in on a window, the cursor hotspot may need updating for the new pointer image, so utilize an existing function we already have which will set the pointer image and calculate updated hotspot. This patch also uses the same function call in _elm_win_frame_cb_move_stop in order to reduce duplication. ref T4987 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/elementary/efl_ui_win.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 1d06584e9a..a9db0f480b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -952,14 +952,11 @@ _elm_win_mouse_in(Ecore_Evas *ee)
952#ifdef HAVE_ELEMENTARY_WL2 952#ifdef HAVE_ELEMENTARY_WL2
953 if ((sd->wl.win) && (sd->pointer.ee)) 953 if ((sd->wl.win) && (sd->pointer.ee))
954 { 954 {
955 _elm_theme_object_set(sd->obj, sd->pointer.obj,
956 "pointer", "base", "default");
957
958 sd->pointer.visible = EINA_TRUE; 955 sd->pointer.visible = EINA_TRUE;
959 ecore_evas_show(sd->pointer.ee); 956 ecore_evas_show(sd->pointer.ee);
960 sd->pointer.surf = ecore_wl2_window_surface_get(sd->pointer.win); 957 sd->pointer.surf = ecore_wl2_window_surface_get(sd->pointer.win);
961 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf, 958
962 sd->pointer.hot_x, sd->pointer.hot_y); 959 _elm_win_wl_cursor_set(sd->obj, NULL);
963 } 960 }
964#endif 961#endif
965} 962}
@@ -3947,13 +3944,7 @@ _elm_win_frame_cb_move_stop(void *data,
3947 ELM_WIN_DATA_GET_OR_RETURN(data, sd); 3944 ELM_WIN_DATA_GET_OR_RETURN(data, sd);
3948 3945
3949#ifdef HAVE_ELEMENTARY_WL2 3946#ifdef HAVE_ELEMENTARY_WL2
3950 if (sd->pointer.obj) 3947 _elm_win_wl_cursor_set(sd->obj, NULL);
3951 _elm_theme_object_set(sd->obj, sd->pointer.obj,
3952 "pointer", "base", "default");
3953
3954 if ((sd->wl.win) && (sd->pointer.surf) && (sd->pointer.visible))
3955 ecore_wl2_window_pointer_set(sd->wl.win, sd->pointer.surf,
3956 sd->pointer.hot_x, sd->pointer.hot_y);
3957#endif 3948#endif
3958} 3949}
3959 3950