]> Dogcows Code - chaz/openbox/blobdiff - scripts/focus.py
remove debug print
[chaz/openbox] / scripts / focus.py
index f51b92144e5ddf02fa989288185aaa514d88eb94..3bbf600fed1a9dcb6f0fa9eeb23a67c30ea89439 100644 (file)
@@ -24,11 +24,12 @@ import ob
 
 # maintain a list of clients, stacked in focus order
 _clients = []
-_disable = 0
+_skip = 0
 
 def _focusable(client, desktop):
     if not client.normal(): return 0
     if not (client.canFocus() or client.focusNotify()): return 0
+    if client.iconic(): return 0
     if AVOID_SKIP_TASKBAR and client.skipTaskbar(): return 0
 
     desk = client.desktop()
@@ -49,7 +50,10 @@ def _remove(client):
 def _focused(data):
     global _clients
 
-    if _disable: return
+    if _skip:
+        global _skip
+        _skip -= 1
+        return
 
     if data.client:
         # move it to the top
@@ -66,7 +70,7 @@ def _focused(data):
 
 def _newwindow(data):
     # make sure its not already in the list
-    win = client.window()
+    win = data.client.window()
     for i in range(len(_clients)):
         if _clients[i].window() == win:
             return
This page took 0.020675 seconds and 4 git commands to generate.