[accerciser] quick_select: filter out non-focus events
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser] quick_select: filter out non-focus events
- Date: Fri, 26 Apr 2019 15:18:32 +0000 (UTC)
commit ac41acdcf79c7719c95342bb6090b66f1b53c05b
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Fri Apr 26 17:17:19 2019 +0200
quick_select: filter out non-focus events
plugins/quick_select.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/plugins/quick_select.py b/plugins/quick_select.py
index 927296a..b977f9d 100644
--- a/plugins/quick_select.py
+++ b/plugins/quick_select.py
@@ -48,6 +48,13 @@ class QuickSelect(Plugin):
@param event: The event that is being handled.
@type event: L{pyatspi.event.Event}
'''
+ if event.type != "object:state-changed:focused" and \
+ event.type != "object:state-changed:selected":
+ return
+
+ if event.detail1 != 1:
+ return
+
if not self.isMyApp(event.source):
self.last_focused = event.source
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]