watch for when theres no clients and avoid exceptions, just don't do shit all
authorDana Jansens <danakj@orodu.net>
Tue, 4 Feb 2003 10:19:59 +0000 (10:19 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 4 Feb 2003 10:19:59 +0000 (10:19 +0000)
scripts/stackedcycle.py

index 5731a56..a632b31 100644 (file)
@@ -192,6 +192,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