aboutsummaryrefslogtreecommitdiff
path: root/xlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'xlib.py')
-rw-r--r--xlib.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlib.py b/xlib.py
index 051b21f..20476aa 100644
--- a/xlib.py
+++ b/xlib.py
@@ -8,12 +8,13 @@ from threading import Thread
from interfaces.message import IMessage, Debug
from zope import component
+from consumer import Mapping
+
@interface.implementer(desktopEvent.IDesktop)
class Listener(Thread):
- def __init__(self, mapping, queue):
+ def __init__(self, mapping):
Thread.__init__(self)
- self.queue = queue
self.mapping = mapping
self.active_window = None
self.last_code = None
@@ -80,7 +81,7 @@ class Listener(Thread):
if code != self.last_code:
component.handle(Debug("Switching to '%s' for '%s'" % (pattern, window_name)))
- self.queue.put ( (code, None) )
+ component.handle(Mapping((code, None)))
self.last_code = code
# We found a matching configuration. Even if the match is the
# same as the current one, we break the loop in order to
@@ -91,7 +92,7 @@ class Listener(Thread):
if default is None:
return
- self.queue.put ( (default, None) )
+ component.handle(Mapping((default, None)))
self.last_code = "default"