diff options
| author | Mattias Andrée <maandree@operamail.com> | 2014-04-26 13:45:26 +0200 | 
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2014-04-26 13:45:26 +0200 | 
| commit | 18d5d8bd20e66bb9cf577d26899d4a2c5f1cd5ba (patch) | |
| tree | 5ddc75ea6adaafd7546e871ceb4cf4c4b2728811 /examples/x-window-focus | |
| parent | update dist (diff) | |
| download | nightshift-18d5d8bd20e66bb9cf577d26899d4a2c5f1cd5ba.tar.gz nightshift-18d5d8bd20e66bb9cf577d26899d4a2c5f1cd5ba.tar.bz2 nightshift-18d5d8bd20e66bb9cf577d26899d4a2c5f1cd5ba.tar.xz  | |
external (?) bug workaround
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples/x-window-focus')
| -rw-r--r-- | examples/x-window-focus | 13 | 
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/x-window-focus b/examples/x-window-focus index cf5798b..3148a80 100644 --- a/examples/x-window-focus +++ b/examples/x-window-focus @@ -62,7 +62,11 @@ def x_window_focus_thread_function(proc):                  # Get window specifications                  wm_class = window.get_wm_class() -                wm_name = window.get_wm_name() +                wm_name = None +                try: +                    wm_name = window.get_wm_name() +                except: +                    pass ## Bug in python3-xlib (?)                  if (wm_class is None) and (wm_name is None):                      x_display.next_event()                      continue @@ -73,9 +77,10 @@ def x_window_focus_thread_function(proc):                            wm_name)                  #sys.stderr.buffer.write((repr(window) + '\n').encode('utf-8'))                  #sys.stderr.buffer.flush() -            except: -                x_display.next_event() -                continue +            finally: +                pass +                #x_display.next_event() +                #continue              # Check that something changed              if (last is not None) and (last == window):  | 
