[orca] Handle massively-delayed selection-changed events for apps like Caja



commit 4ec07c017de5cc039aa849b6fb21a252713d8b7f
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Feb 26 11:23:36 2021 +0100

    Handle massively-delayed selection-changed events for apps like Caja
    
    Normally when a user copies and pastes a file/folder in a file manager,
    we get a selection-changed event from the container of the just-pasted
    item and want to update our location. But when copying and pasting a
    large number of items in Caja, we are placed in a new window for the
    progress and eventually get the aforementioned selection-changed event.
    Therefore, be sure the container is in the active window before updating
    our location.

 src/orca/scripts/default.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 698769bef..37abac603 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2544,7 +2544,8 @@ class Script(script.Script):
         state = obj.getState()
 
         if self.utilities.handlePasteLocusOfFocusChange():
-            orca.setLocusOfFocus(event, event.source, False)
+            if self.utilities.topLevelObjectIsActiveAndCurrent(event.source):
+                orca.setLocusOfFocus(event, event.source, False)
         elif self.utilities.handleContainerSelectionChange(event.source):
             return
         else:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]