trigger client mouse-in on x11 mouse movement for non-action clients
authorMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 29 Jun 2015 20:01:52 +0000 (16:01 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 29 Jun 2015 20:01:52 +0000 (16:01 -0400)
this should fix the case of mouse-based focus policies trying to reapply
focus after another client has stolen it away without the pointer leaving
the window

src/bin/e_comp_x.c

index 4f1e922..57981cd 100644 (file)
@@ -2227,7 +2227,16 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
    E_Client *ec;
 
    ec = e_client_action_get();
-   if (!ec) return ECORE_CALLBACK_RENEW;
+   if (!ec)
+     {
+        ec = _e_comp_x_client_find_by_window(ev->window);
+        if ((!ec) && (ev->window != ev->event_window))
+          ec = _e_comp_x_client_find_by_window(ev->event_window);
+        if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
+        if (!ec->mouse.in)
+          e_client_mouse_in(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y));
+        return ECORE_CALLBACK_RENEW;
+     }
    E_COMP_X_PIXMAP_CHECK ECORE_CALLBACK_RENEW;
    if (_e_comp_x_client_data_get(ec)->deleted || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
    if (e_client_util_resizing_get(ec) &&