Index: src/orca/default.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/default.py,v
retrieving revision 1.193
diff -u -r1.193 default.py
--- src/orca/default.py	18 Aug 2006 10:34:18 -0000	1.193
+++ src/orca/default.py	28 Aug 2006 22:37:09 -0000
@@ -1918,17 +1918,6 @@
         - event: the Event
         """
 
-        # Sometimes an object will tell us it is focused this
-        # way versus issuing a focus event.  GEdit's edit area,
-        # for example, will do this: when you use metacity's
-        # window menu to do things like maximize or unmaximize
-        # a window, you will only get a state-changed event
-        # from the text area when it regains focus.
-        #
-        if (event.type == "object:state-changed:focused") \
-           and (event.detail1):
-            orca.setLocusOfFocus(event, event.source)
-
         # Do we care?
         #
         if state_change_notifiers.has_key(event.source.role):
Index: src/orca/scripts/gedit.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/scripts/gedit.py,v
retrieving revision 1.16
diff -u -r1.16 gedit.py
--- src/orca/scripts/gedit.py	28 Jul 2006 17:33:18 -0000	1.16
+++ src/orca/scripts/gedit.py	28 Aug 2006 22:37:09 -0000
@@ -314,3 +314,24 @@
 
         # Pass the event onto the parent class to be handled in the default way.
         default.Script.onNameChanged(self, event)
+
+    def onStateChanged(self, event):
+        """Called whenever an object's state changes.
+
+        Arguments:
+        - event: the Event
+        """
+
+        # Sometimes an object will tell us it is focused this
+        # way versus issuing a focus event.  GEdit's edit area,
+        # for example, will do this: when you use metacity's
+        # window menu to do things like maximize or unmaximize
+        # a window, you will only get a state-changed event
+        # from the text area when it regains focus.
+        # (See bug #350854 for more details).
+        #
+        if (event.type == "object:state-changed:focused") \
+           and (event.detail1):
+            orca.setLocusOfFocus(event, event.source)
+
+        default.Script.onSelectionChanged(self, event)
