forked from enlightenment/enlightenment
simplify e_desk_show visibility unsetting, reject recursive desk flips
the currently visible desk for a zone is stored on the zone struct, so iterating here is unnecessary. furthermore, at the time when a desk is hidden, a client may begin receiving mouse events which could trigger a focus-set and lead to another desk flip. at this time and only this time, the "current" desk will be marked as not visible, and so this sort of desk show must be rejected fix T2676
This commit is contained in:
parent
e426805993
commit
26b1e84e6f
|
@ -216,25 +216,21 @@ e_desk_show(E_Desk *desk)
|
||||||
Edje_Message_Int_Set *msg;
|
Edje_Message_Int_Set *msg;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Shelf *es;
|
E_Shelf *es;
|
||||||
int was_zone = 0, x, y, dx = 0, dy = 0;
|
E_Desk *desk2;
|
||||||
|
int was_zone = 0, dx = 0, dy = 0;
|
||||||
|
|
||||||
E_OBJECT_CHECK(desk);
|
E_OBJECT_CHECK(desk);
|
||||||
E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
|
E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
|
||||||
if (desk->visible) return;
|
if (desk->visible) return;
|
||||||
|
|
||||||
|
desk2 = e_desk_at_xy_get(desk->zone, desk->zone->desk_x_current, desk->zone->desk_y_current);
|
||||||
|
if ((!starting) && (!desk2->visible)) return;
|
||||||
eev = E_NEW(E_Event_Desk_Before_Show, 1);
|
eev = E_NEW(E_Event_Desk_Before_Show, 1);
|
||||||
eev->desk = e_desk_current_get(desk->zone);
|
eev->desk = e_desk_current_get(desk->zone);
|
||||||
e_object_ref(E_OBJECT(eev->desk));
|
e_object_ref(E_OBJECT(eev->desk));
|
||||||
ecore_event_add(E_EVENT_DESK_BEFORE_SHOW, eev,
|
ecore_event_add(E_EVENT_DESK_BEFORE_SHOW, eev,
|
||||||
_e_desk_event_desk_before_show_free, NULL);
|
_e_desk_event_desk_before_show_free, NULL);
|
||||||
|
|
||||||
for (x = 0; x < desk->zone->desk_x_count; x++)
|
|
||||||
{
|
|
||||||
for (y = 0; y < desk->zone->desk_y_count; y++)
|
|
||||||
{
|
|
||||||
E_Desk *desk2;
|
|
||||||
|
|
||||||
desk2 = e_desk_at_xy_get(desk->zone, x, y);
|
|
||||||
if (desk2->visible)
|
if (desk2->visible)
|
||||||
{
|
{
|
||||||
desk2->visible = 0;
|
desk2->visible = 0;
|
||||||
|
@ -259,9 +255,6 @@ e_desk_show(E_Desk *desk)
|
||||||
dy = desk->y - desk2->y;
|
dy = desk->y - desk2->y;
|
||||||
}
|
}
|
||||||
_e_desk_hide_begin(desk2, dx, dy);
|
_e_desk_hide_begin(desk2, dx, dy);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
desk->zone->desk_x_prev = desk->zone->desk_x_current;
|
desk->zone->desk_x_prev = desk->zone->desk_x_current;
|
||||||
|
|
Loading…
Reference in New Issue