From 9d196904eff03e5de55bef6badc3edc6136d2ab2 Mon Sep 17 00:00:00 2001 From: portnov Date: Wed, 1 Oct 2008 11:36:17 +0600 Subject: [PATCH] Wrap collect_windows() call to try..excet. Some WMs do not set _NET_CLIENT_LIST atom for root window. --- qwerty.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qwerty.py b/qwerty.py index c4db872..a2e2401 100755 --- a/qwerty.py +++ b/qwerty.py @@ -41,7 +41,7 @@ LINEHEIGHT = 1.2 KEYS = [ "QWERTYUIOP", "ASDFGHJKL", "ZXCVBNM" ] -ALPHABET = KEYS[0] + KEYS[1] + KEYS[2] +ALPHABET = ''.join(KEYS) DIGITS = '1234567890' @@ -931,7 +931,10 @@ class GUI(object): if not mods: mods = [] - self.collect_windows() + try: + self.collect_windows() + except: + print 'Could not get list of open windows!' id = (int(k)-1)%10 try: -- 1.7.2.3