orca r4393 - in trunk: . src/orca/scripts/toolkits/Gecko



Author: joanied
Date: Mon Dec 29 15:25:34 2008
New Revision: 4393
URL: http://svn.gnome.org/viewvc/orca?rev=4393&view=rev

Log:
* src/orca/scripts/toolkits/Gecko/script.py:
  Fix for bug #565886 - Extraneous caret-moved events emitted by
  FF 3.1 cause unnecessary braille updating.



Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/toolkits/Gecko/script.py

Modified: trunk/src/orca/scripts/toolkits/Gecko/script.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/script.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/script.py	Mon Dec 29 15:25:34 2008
@@ -1353,6 +1353,16 @@
             locusOfFocusState = pyatspi.StateSet()
             locusOfFocusState = locusOfFocusState.raw()
 
+        # Find out if the caret really moved. Firefox 3.1 gives us caret-moved
+        # events when certain focusable objects first get focus. If we haven't
+        # really moved, there's no point in updating braille again -- which is
+        # what we'll wind up doing if this event reaches the default script.
+        #
+        [obj, characterOffset] = self.getCaretContext()
+        if max(0, characterOffset) == event.detail1 \
+           and self.isSameObject(obj, event.source):
+            return
+
         if isinstance(orca_state.lastInputEvent, input_event.KeyboardEvent):
             string = orca_state.lastNonModifierKeyEvent.event_string
             if self.useCaretNavigationModel(orca_state.lastInputEvent):



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