fix shelf autohide when mouse moves out of systray from a systrayed icon's menu
SVN revision: 72783
This commit is contained in:
parent
1f771425e4
commit
80d70ec5dd
|
@ -1488,6 +1488,16 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
|
||||||
edje_object_signal_emit(es->o_base, "e,state,focused", "e");
|
edje_object_signal_emit(es->o_base, "e,state,focused", "e");
|
||||||
e_shelf_toggle(es, 1);
|
e_shelf_toggle(es, 1);
|
||||||
}
|
}
|
||||||
|
else if (es->systrayed)
|
||||||
|
{
|
||||||
|
int x, y, w, h;
|
||||||
|
evas_object_geometry_get(es->o_event, &x, &y, &w, &h);
|
||||||
|
if (!E_INSIDE(ev->x, ev->y, x, y, w, h))
|
||||||
|
{
|
||||||
|
es->systrayed = EINA_FALSE;
|
||||||
|
e_shelf_toggle(es, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type == ECORE_EVENT_MOUSE_MOVE)
|
else if (type == ECORE_EVENT_MOUSE_MOVE)
|
||||||
{
|
{
|
||||||
|
@ -1515,6 +1525,7 @@ _e_shelf_cb_mouse_out(void *data, int type, void *event)
|
||||||
if (type == ECORE_X_EVENT_MOUSE_OUT)
|
if (type == ECORE_X_EVENT_MOUSE_OUT)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Mouse_Out *ev;
|
Ecore_X_Event_Mouse_Out *ev;
|
||||||
|
int x, y, w, h;
|
||||||
|
|
||||||
ev = event;
|
ev = event;
|
||||||
|
|
||||||
|
@ -1531,9 +1542,19 @@ _e_shelf_cb_mouse_out(void *data, int type, void *event)
|
||||||
* not get mouse out itself, so it will stay visible and
|
* not get mouse out itself, so it will stay visible and
|
||||||
* autohide will fail.
|
* autohide will fail.
|
||||||
*/
|
*/
|
||||||
if (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR) return ECORE_CALLBACK_PASS_ON;
|
if (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR)
|
||||||
|
{
|
||||||
|
//fprintf(stderr, "SYSTRAYED\n");
|
||||||
|
es->systrayed = EINA_TRUE;
|
||||||
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
}
|
||||||
|
|
||||||
e_shelf_toggle(es, 0);
|
evas_object_geometry_get(es->o_event, &x, &y, &w, &h);
|
||||||
|
if (!E_INSIDE(ev->x, ev->y, x, y, w, h))
|
||||||
|
{
|
||||||
|
//fprintf(stderr, "EVENT: %d,%d %dx%d || MOUSE: %d,%d\n", x, y, w, h, ev->x, ev->y);
|
||||||
|
e_shelf_toggle(es, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ struct _E_Shelf
|
||||||
unsigned char toggle : 1;
|
unsigned char toggle : 1;
|
||||||
unsigned char edge : 1;
|
unsigned char edge : 1;
|
||||||
unsigned char urgent_show : 1;
|
unsigned char urgent_show : 1;
|
||||||
|
unsigned char systrayed : 1;
|
||||||
unsigned int locked;
|
unsigned int locked;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue