From c27035a029cdcbfb854ea0760fd083b5d8870c6d Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 4 Dec 2023 19:17:06 +0100 Subject: Use of orderedDict in order to give higher priority to custom layer --- win32.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'win32.py') 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) -- cgit v1.2.3