]> Dogcows Code - chaz/openbox/commitdiff
cycling by any number of windows
authorDana Jansens <danakj@orodu.net>
Thu, 23 Jan 2003 09:03:06 +0000 (09:03 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 23 Jan 2003 09:03:06 +0000 (09:03 +0000)
scripts/focus.py

index 084faebaa1f989969904b9615a96fdda03df6126..c0d60b1ee7bb06308f05cd65d5ea268e3738a42a 100644 (file)
@@ -71,11 +71,11 @@ def focus_next(data, num=1, forward=1):
                 screen.raiseWindow(client)
             return
         if forward:
-            t += 1
-            if t == count: t = 0
+            t += num
+            if t >= count: t -= count
         else:
             t -= 1
-            if t < 0: t = count - 1
+            if t < 0: t += count
         if t == target: return # nothing to focus
 
 def focus_prev(data, num=1):
This page took 0.024185 seconds and 4 git commands to generate.