]> Dogcows Code - chaz/openbox/blobdiff - scripts/stackedcycle.py
keep iconic windows at the bottom of the cycling list always
[chaz/openbox] / scripts / stackedcycle.py
index 5731a56456b82f641687d393d63ea48c18d9d6eb..757154a61470396c63db578b2039243b91d2e293 100644 (file)
@@ -93,11 +93,15 @@ class cycledata:
         oldpos = self.menupos
         self.menupos = -1
 
-        # get the list of clients
+        # get the list of clients, keeping iconic windows at the bottom
         self.clients = []
+        iconic_clients = []
         for i in focus._clients:
             c = ob.openbox.findClient(i)
-            if c: self.clients.append(c)
+            if c:
+                if c.iconic(): iconic_clients.append(c)
+                else: self.clients.append(c)
+        self.clients.extend(iconic_clients)
 
         font = self.style.labelFont()
         longest = 0
@@ -192,6 +196,8 @@ class cycledata:
             # popup disappears, screwing up the focus
             ob.mgrab(self.screen.number())
 
+        if not len(self.clients): return # don't both doing anything
+        
         self.menuwidgets[self.menupos].unfocus()
         if forward:
             self.menupos += 1
This page took 0.021403 seconds and 4 git commands to generate.