X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=scripts%2Ffocus.py;h=0dfd3fb8142d1f9d5749c7ed096fac6a6fcecafb;hb=299f7ad213532a76d748ce5ef02e7a147b75c1fc;hp=de426c720a2484d05d869242bedd7e88fcaabc33;hpb=82d147b5d74757ce6f1676aab16c9e6e1e837b4e;p=chaz%2Fopenbox diff --git a/scripts/focus.py b/scripts/focus.py index de426c72..0dfd3fb8 100644 --- a/scripts/focus.py +++ b/scripts/focus.py @@ -48,15 +48,13 @@ def _remove(client): raise ValueError("_remove(x): x not in _clients list.") def _focused(data): - global _clients + global _clients, _skip if _skip: - global _skip _skip -= 1 return if data.client: - print data.client.window() # move it to the top try: _remove(data.client) @@ -66,7 +64,8 @@ def _focused(data): # pass around focus desktop = ob.openbox.screen(data.screen).desktop() for c in _clients: - if _focusable(c, desktop) and c.focus(): + if _focusable(c, desktop): + c.focus() break def _newwindow(data):