src/macosx/classes/sun/lwawt/macosx/CToolkitThreadBlockedHandler.java

Print this page

        

@@ -25,13 +25,13 @@
 
 package sun.lwawt.macosx;
 
 import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
 
-// TODO:BG this class is really a NOOP right now, but should be filled in if needed.
-
 final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler {
+    private final LWCToolkit toolkit = (LWCToolkit)java.awt.Toolkit.getDefaultToolkit();
+
     public void lock() {
     }
 
     public void unlock() {
     }

@@ -39,11 +39,12 @@
     protected boolean isOwned() {
        return false;
     }
 
     public void enter() {
+        toolkit.startNativeNestedEventLoop();
     }
 
     public void exit() {
+        toolkit.stopNativeNestedEventLoop();
     }
-
 }