src/macosx/classes/com/apple/eawt/event/GestureHandler.java
Print this page
@@ -23,10 +23,12 @@
* questions.
*/
package com.apple.eawt.event;
+import sun.awt.SunToolkit;
+
import java.awt.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
@@ -68,11 +70,11 @@
// called from native - finds the deepest component with an installed GestureHandler,
// creates a single event, and dispatches it to a recursive notifier
static void handleGestureFromNative(final Window window, final int type, final double x, final double y, final double a, final double b) {
if (window == null) return; // should never happen...
- EventQueue.invokeLater(new Runnable() {
+ SunToolkit.executeOnEventHandlerThread(window, new Runnable() {
public void run() {
final Component component = SwingUtilities.getDeepestComponentAt(window, (int)x, (int)y);
final PerComponentNotifier firstNotifier;
if (component instanceof RootPaneContainer) {