summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-12 17:17:38 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-12 17:17:38 -0500
commitf09e410285b724379742e5753b958cb3b51a75ad (patch)
tree7e8744dc7da1a4f3ce129ba0da8c4a08bf1e9779
parent660c7cb2e52263d782367d379143b138bebccc78 (diff)
improve x11 client focusing with mouse-based focus policies on mouse move
in the case that a mouse move event occurs, the compositor should validate the event to ensure that the mouse cursor is actually over the window that the event claims to be from fix T2594
-rw-r--r--src/bin/e_comp_x.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index dce9641e3..2fedda4c0 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -2376,8 +2376,22 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
2376 if ((!ec) && (ev->window != ev->event_window)) 2376 if ((!ec) && (ev->window != ev->event_window))
2377 ec = _e_comp_x_client_find_by_window(ev->event_window); 2377 ec = _e_comp_x_client_find_by_window(ev->event_window);
2378 if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW; 2378 if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
2379 if ((!ec->mouse.in) && (!ec->hidden) && e_client_util_desk_visible(ec, e_desk_current_get(ec->zone))) 2379 if ((!ec->mouse.in) && evas_object_visible_get(ec->frame) && (!ec->desk->animate_count))
2380 e_client_mouse_in(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y)); 2380 {
2381 E_Client *tec;
2382 Ecore_Window top = e_comp_top_window_at_xy_get(ev->root.x, ev->root.y);
2383 int x, y;
2384 if (top == e_comp->ee_win) return ECORE_CALLBACK_RENEW;
2385
2386 x = e_comp_canvas_x_root_adjust(ev->root.x);
2387 y = e_comp_canvas_x_root_adjust(ev->root.y);
2388 for (tec = e_client_above_get(ec); tec; tec = e_client_above_get(tec))
2389 {
2390 if (!evas_object_visible_get(tec->frame)) continue;
2391 if (E_INSIDE(x, y, tec->x, tec->y, tec->w, tec->h)) return ECORE_CALLBACK_RENEW;
2392 }
2393 e_client_mouse_in(ec, x, y);
2394 }
2381 return ECORE_CALLBACK_RENEW; 2395 return ECORE_CALLBACK_RENEW;
2382 } 2396 }
2383 E_COMP_X_PIXMAP_CHECK ECORE_CALLBACK_RENEW; 2397 E_COMP_X_PIXMAP_CHECK ECORE_CALLBACK_RENEW;