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
This commit is contained in:
Gustavo Sverzut Barbieri 2009-04-17 04:56:54 +00:00
parent 3aae39faec
commit 6c7e4540e2
1 changed files with 12 additions and 1 deletions

View File

@ -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;