]> gcc.gnu.org Git - gcc.git/blobdiff - libjava/java/awt/EventDispatchThread.java
[multiple changes]
[gcc.git] / libjava / java / awt / EventDispatchThread.java
index 91145e1bb48a7a8a9c080fc57fce92ed4a324ac0..89b6095578f110bc5debe8b1af1937e045194809 100644 (file)
@@ -67,7 +67,17 @@ class EventDispatchThread extends Thread
              // We are interrupted when we should finish executing
              return;
            }
-         queue.dispatchEvent(evt);
+
+          KeyboardFocusManager manager;
+          manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();
+
+          // Try to dispatch this event to the current keyboard focus
+          // manager.  It will dispatch all FocusEvents, all
+          // WindowEvents related to focus, and all KeyEvents,
+          // returning true.  Otherwise, it returns false and we
+          // dispatch the event normally.
+          if (!manager.dispatchEvent (evt))
+            queue.dispatchEvent(evt);
        }
        catch (InterruptedException ie)
        {
This page took 0.031174 seconds and 5 git commands to generate.