From eb37238fa3cc8f8a1dbd0df40f378a7d2ad54692 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Tue, 28 Feb 2017 20:48:11 +0100 Subject: [PATCH] Fix exception when running under Wayland where we attempt something X11 specific --- terminatorlib/terminator.py | 4 ++-- terminatorlib/window.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 9ad7425b..d50e7ff6 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -401,7 +401,7 @@ class Terminator(Borg): window.grab_focus() try: t = GdkX11.x11_get_server_time(window.get_window()) - except AttributeError: + except (TypeError, AttributeError): t = 0 window.get_window().focus(t) @@ -417,7 +417,7 @@ class Terminator(Borg): window.grab_focus() try: t = GdkX11.x11_get_server_time(window.get_window()) - except AttributeError: + except (TypeError, AttributeError): t = 0 window.get_window().focus(t) diff --git a/terminatorlib/window.py b/terminatorlib/window.py index 6ab38461..6483f70c 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -311,7 +311,7 @@ class Window(Container, Gtk.Window): self.grab_focus() try: t = GdkX11.x11_get_server_time(self.get_window()) - except AttributeError: + except (TypeError, AttributeError): t = 0 self.get_window().focus(t) else: