Fix wrong deskshow function

Summary:
The loop E_CLIENT_REVERSE_FOREACH was used to iconify and uniconify the
icons. The worked well for uninconify.

But if the first client with the focus gets iconifyed the lower one in
the stack will get the focus and will be raised to the top, but the loop
will continue with the next of the now iconifyed e_client, so this one
will be skipped.

Now the forward loop is used to iconify and the reverse to uniconify the
e_clients.

This fixes T1797

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, cippp

Maniphest Tasks: T1797

Differential Revision: https://phab.enlightenment.org/D1655
This commit is contained in:
Marcel Hollerbach 2014-11-12 20:35:53 +01:00
parent 5b992bdc4a
commit c2f596a06a
1 changed files with 16 additions and 8 deletions

View File

@ -341,23 +341,31 @@ e_desk_deskshow(E_Zone *zone)
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
desk = e_desk_current_get(zone);
/* uniconify raises windows and changes stacking order
* go top-down to avoid skipping windows
*/
E_CLIENT_REVERSE_FOREACH(zone->comp, ec)
if (desk->deskshow_toggle)
{
if (e_client_util_ignored_get(ec)) continue;
if (ec->desk != desk) continue;
if (desk->deskshow_toggle)
/* uniconify raises windows and changes stacking order
* go top-down to avoid skipping windows
*/
E_CLIENT_REVERSE_FOREACH(zone->comp, ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (ec->desk != desk) continue;
if (ec->deskshow)
{
ec->deskshow = 0;
e_client_uniconify(ec);
}
}
else
}
else
{
/*
* iconify raises, so we ahve to start from the bottom so we are going forward
*/
E_CLIENT_FOREACH(zone->comp, ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (ec->desk != desk) continue;
if (ec->iconic) continue;
if (ec->netwm.state.skip_taskbar) continue;
if (ec->user_skip_winlist) continue;