discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e3f829ace78419ef91997d3637f048dd2a399de2

commit e3f829ace78419ef91997d3637f048dd2a399de2
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Jan 19 13:49:10 2016 -0500

    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
---
 src/modules/everything/evry.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c
index 959f776..eed3f8c 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)
    if (!win->grab)
      return ECORE_CALLBACK_PASS_ON;
 
-   if ((win->grab && (ev->event_window != ecore_evas_window_get(e_comp->ee))) 
&&
+   if ((ev->event_window != ecore_evas_window_get(e_comp->ee)) &&
        (ev->event_window != elm_win_window_id_get(win->ewin)))
      return ECORE_CALLBACK_PASS_ON;
 
@@ -954,12 +954,20 @@ _evry_cb_mouse(void *data, int type, void *event)
      {
         win->mouse_out = 0;
 
-        if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
-                      e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))
+        if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
           {
-             win->mouse_out = 1;
-             return ECORE_CALLBACK_PASS_ON;
+             if (ev->event_window == ecore_evas_window_get(e_comp->ee))
+               {
+                  if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
+                      e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))
+                    win->mouse_out = 1;
+               }
           }
+        else if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
+                 e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))
+          win->mouse_out = 1;
+        if (win->mouse_out)
+          return ECORE_CALLBACK_PASS_ON;
 
         win->mouse_button = ev->buttons;
      }
@@ -967,9 +975,7 @@ _evry_cb_mouse(void *data, int type, void *event)
      {
         win->mouse_button = 0;
 
-        if (win->mouse_out &&
-            (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
-                      e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h)))
+        if (win->mouse_out)
           {
              evry_hide(win, 0);
              return ECORE_CALLBACK_PASS_ON;

-- 


Reply via email to