From 6c7e4540e2db153fa77a809e32c6493076ec616f Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 17 Apr 2009 04:56:54 +0000 Subject: [PATCH] shelf ignore mouse_out when going to children windows. this solves an annoyance with systray: the bounce-on-mouse-over (mouse over systray would make shelf hide, but after the animation starts the shelf get mouse-in again and abort the hide, then starts again). But it will introduce another annoyance: if systray open a menu and you navigate to it, shelf will not get mouse-out event and thus will not autohide. I'm leaving this behavior as it is less annoying. I discussed a bit with rasterman and solving this is not easy, we'd need to poll for mouse position and query window tree, this would waste cpu and keep timeout rate high, draining battery. SVN revision: 40128 --- src/bin/e_shelf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index 53d0e9b00..ebdad1caa 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -1458,7 +1458,18 @@ _e_shelf_cb_mouse_out(void *data, int type, void *event) if (es->popup) win = es->popup->evas_win; else win = es->zone->container->event_win; if (ev->win != win) return 1; - + + /* + * ECORE_X_EVENT_DETAIL_INFERIOR means focus went to children windows + * so do not hide shelf on this case (ie: systray base window, or + * embedded icons). + * + * Problem: when child window get mouse out, shelf window will + * not get mouse out itself, so it will stay visible and + * autohide will fail. + */ + if (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR) return 1; + e_shelf_toggle(es, 0); } return 1;