bu5hm4n pushed a commit to branch enlightenment-0.19.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=b2f576965da9f9238fd27297d6522649aba92adb

commit b2f576965da9f9238fd27297d6522649aba92adb
Author: Marcel Hollerbach <[email protected]>
Date:   Wed Nov 12 20:35:53 2014 +0100

    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
---
 src/bin/e_desk.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
index 045a086..58f2211 100644
--- a/src/bin/e_desk.c
+++ b/src/bin/e_desk.c
@@ -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;

-- 


Reply via email to