[orca] Fix for bgo#Bug 568696 - locus of focus changes when updating list of files in nautilus



commit d18f5d88005d0153dcb155ed52df7117788dbeb7
Author: Willie Walker <william walker sun com>
Date:   Fri Jun 19 13:12:50 2009 -0400

    Fix for bgo#Bug 568696 - locus of focus changes when updating list of files in nautilus

 src/orca/focus_tracking_presenter.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/focus_tracking_presenter.py b/src/orca/focus_tracking_presenter.py
index 708ba7a..5b985cb 100644
--- a/src/orca/focus_tracking_presenter.py
+++ b/src/orca/focus_tracking_presenter.py
@@ -670,6 +670,16 @@ class FocusTrackingPresenter(presentation_manager.PresentationManager):
                                 and (orca_state.activeScript.app \
                                      != event.host_application)
 
+                    # One last check -- let's make sure the new script actually
+                    # has an active window.  See bug #568696.
+                    #
+                    if setNewActiveScript and event.host_application:
+                        setNewActiveScript = False
+                        for child in event.host_application:
+                            if child.getState().contains(pyatspi.STATE_ACTIVE):
+                                setNewActiveScript = True
+                                break
+
                     if not reason and setNewActiveScript:
                         reason = "object received focus"
 



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