summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-03-17 23:38:19 +0100
committerGuillaume Seguin <guillaume@segu.in>2008-03-17 23:38:19 +0100
commitf12d3721d741ec0fdbaf506f194d00c1ade6941f (patch)
treea23835031d45fcce5a1f0c92f80a0db88f5f24c3
parent271b46295f2632615a503aaf32f6c7ee59b9c0d5 (diff)
downloadenso_linux-f12d3721d741ec0fdbaf506f194d00c1ade6941f.tar.gz
enso_linux-f12d3721d741ec0fdbaf506f194d00c1ade6941f.tar.bz2
* Cleanly stop input handling when something wrong occured
-rw-r--r--linux/enso_linux/input.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux/enso_linux/input.py b/linux/enso_linux/input.py
index 14c40ec..df0c1a1 100644
--- a/linux/enso_linux/input.py
+++ b/linux/enso_linux/input.py
@@ -199,7 +199,7 @@ class _KeyListener (Thread):
def error_handler (self, error, *args):
'''Catch Xlib errors'''
logging.critical ("X protocol error caught : %s" % error)
- gtk.main_quit ()
+ self.__parent.stop ()
def grab (self, keys):
'''Grab a specific key'''
@@ -246,7 +246,8 @@ key-repeat problems")
X.GrabModeAsync, X.GrabModeAsync)
return key, keycode
logging.critical ("Couldn't find quasimode key")
- gtk.main_quit ()
+ self.__parent.stop ()
+ return None, None
def ungrab (self, keycode):
'''Ungrab a specific key'''