[orca] Filter out duplicate clipboard contents changed notifications
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Filter out duplicate clipboard contents changed notifications
- Date: Tue, 8 Oct 2019 19:22:56 +0000 (UTC)
commit 5eba5318e427943af5019ab7df3b180c970f0bf4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Oct 8 15:22:25 2019 -0400
Filter out duplicate clipboard contents changed notifications
src/orca/script_utilities.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index ac9b085fb..d376758ab 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -66,6 +66,7 @@ _settingsManager = settings_manager.getManager()
class Utilities:
_desktop = pyatspi.Registry.getDesktop(0)
+ _last_clipboard_update = time.time()
EMBEDDED_OBJECT_CHARACTER = '\ufffc'
ZERO_WIDTH_NO_BREAK_SPACE = '\ufeff'
@@ -4638,6 +4639,12 @@ class Utilities:
if not script:
return
+ if time.time() - Utilities._last_clipboard_update < 0.05:
+ msg = "INFO: Clipboard contents change notification believed to be duplicate"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return
+
+ Utilities._last_clipboard_update = time.time()
script.onClipboardContentsChanged(*args)
def connectToClipboard(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]