aboutsummaryrefslogtreecommitdiff
path: root/win32.py
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-12-04 19:17:06 +0100
committerSébastien Dailly <sebastien@dailly.me>2023-12-04 19:17:06 +0100
commitc27035a029cdcbfb854ea0760fd083b5d8870c6d (patch)
tree5774bbab92e471ebac547e726286cb70b4d3c49b /win32.py
parent78a31a0768b0c2b6232514e5ffbfd26c7901c4b0 (diff)
Use of orderedDict in order to give higher priority to custom layer
Diffstat (limited to 'win32.py')
-rwxr-xr-xwin32.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/win32.py b/win32.py
index bff980b..ee146e6 100755
--- a/win32.py
+++ b/win32.py
@@ -87,10 +87,11 @@ class Listener(object):
if title.value is None:
return
title = str(title.value).lower()
- for pattern, code in self.mapping.items():
+ for pattern in reversed(self.mapping):
if pattern == "default":
continue
if pattern in title:
+ code = self.mapping[pattern]
self.queue.put ( (code, None) )
return
default = self.mapping.get("default", None)