summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-01-19 13:49:10 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-02 13:34:21 -0500
commitda2af2de23420c87cb1b06bef2cf725bef9be0f3 (patch)
tree95c8d697fdad256ae1c387cce8ce125c8d8f97d4
parent76d7824a7c825efc2a96eca5e61c16a079ff1156 (diff)
more correctly handle evry mouse detection on wayland
in this case, mouse events which are not originating from the internal window are for the screen, and these coords can be used for determining "mouse out". if the mouse event comes from the window, it is inside the window. ref 7c661b54a94351717201ac18f4c79a44a3207320
-rw-r--r--src/modules/everything/evry.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c
index 959f7767a..eed3f8cf3 100644
--- a/src/modules/everything/evry.c
+++ b/src/modules/everything/evry.c
@@ -890,7 +890,7 @@ _evry_cb_mouse(void *data, int type, void *event)
890 if (!win->grab) 890 if (!win->grab)
891 return ECORE_CALLBACK_PASS_ON; 891 return ECORE_CALLBACK_PASS_ON;
892 892
893 if ((win->grab && (ev->event_window != ecore_evas_window_get(e_comp->ee))) && 893 if ((ev->event_window != ecore_evas_window_get(e_comp->ee)) &&
894 (ev->event_window != elm_win_window_id_get(win->ewin))) 894 (ev->event_window != elm_win_window_id_get(win->ewin)))
895 return ECORE_CALLBACK_PASS_ON; 895 return ECORE_CALLBACK_PASS_ON;
896 896
@@ -954,12 +954,20 @@ _evry_cb_mouse(void *data, int type, void *event)
954 { 954 {
955 win->mouse_out = 0; 955 win->mouse_out = 0;
956 956
957 if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x), 957 if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
958 e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))
959 { 958 {
960 win->mouse_out = 1; 959 if (ev->event_window == ecore_evas_window_get(e_comp->ee))
961 return ECORE_CALLBACK_PASS_ON; 960 {
961 if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
962 e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))
963 win->mouse_out = 1;
964 }
962 } 965 }
966 else if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
967 e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))
968 win->mouse_out = 1;
969 if (win->mouse_out)
970 return ECORE_CALLBACK_PASS_ON;
963 971
964 win->mouse_button = ev->buttons; 972 win->mouse_button = ev->buttons;
965 } 973 }
@@ -967,9 +975,7 @@ _evry_cb_mouse(void *data, int type, void *event)
967 { 975 {
968 win->mouse_button = 0; 976 win->mouse_button = 0;
969 977
970 if (win->mouse_out && 978 if (win->mouse_out)
971 (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
972 e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h)))
973 { 979 {
974 evry_hide(win, 0); 980 evry_hide(win, 0);
975 return ECORE_CALLBACK_PASS_ON; 981 return ECORE_CALLBACK_PASS_ON;