X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=scripts%2Ffocus.py;h=adba37258fb89ed93a885e010b9165c9abad065e;hb=3409b046a043d8ffabf2e9c33ea037c2e5be15e4;hp=e8fe965bccfe905bfd7f9bfe3aa0ef522896b675;hpb=3ec33ffba5b1ae8d6b9a4b35999795067ed90732;p=chaz%2Fopenbox diff --git a/scripts/focus.py b/scripts/focus.py index e8fe965b..adba3725 100644 --- a/scripts/focus.py +++ b/scripts/focus.py @@ -135,13 +135,13 @@ def _focus_stacked_ungrab(data): if data.action == ob.KeyAction.Release: # have all the modifiers this started with been released? if not _cyc_mask & data.state: + _destroy_popup_list() ob.kungrab() # ungrab ourself _doing_stacked = 0; if cycle_raise: client = ob.openbox.findClient(_cyc_w) if client: ob.openbox.screen(data.screen).raiseWindow(client) - _destroy_popup_list() _list_widget = 0 _list_labels = [] @@ -194,19 +194,21 @@ def _create_popup_list(data): for c in _clients: client = ob.openbox.findClient(c) desktop = ob.openbox.screen(data.screen).desktop() - if client and (client.desktop() == desktop and \ - client.normal()): + if client and ((client.desktop() == desktop or + client.desktop() == 0xffffffff) and \ + client.normal() and (client.canFocus() or + client.focusNotify())): t = client.title() if len(t) > 50: # limit the length of titles t = t[:24] + "..." + t[-24:] titles.append(t) _list_windows.append(c) - l = font.measureString(t) + 10 # add margin + l = font.measureString(t) if l > longest: longest = l if len(titles) > 1: for t in titles: w = otk.FocusLabel(_list_widget) - w.resize(longest, height) + w.fitSize(longest, height) w.setText(t) w.unfocus() _list_labels.append(w)