src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
Print this page
*** 28,37 ****
--- 28,38 ----
import java.awt.*;
import java.awt.Dialog.ModalityType;
import java.awt.event.*;
import java.awt.peer.WindowPeer;
import java.beans.*;
+ import java.lang.reflect.InvocationTargetException;
import java.util.List;
import javax.swing.*;
import sun.awt.*;
*** 855,865 ****
}
}
private void flushBuffers() {
if (isVisible() && !nativeBounds.isEmpty()) {
! LWCToolkit.getLWCToolkit().flushPendingEventsOnAppkit(target);
}
}
/*************************************************************
* Callbacks from the AWTWindow and AWTView objc classes.
--- 856,875 ----
}
}
private void flushBuffers() {
if (isVisible() && !nativeBounds.isEmpty()) {
! try {
! LWCToolkit.invokeAndWait(new Runnable() {
! @Override
! public void run() {
! //Posting an empty to flush the EventQueue without blocking the main thread
! }
! }, target);
! } catch (InterruptedException | InvocationTargetException e) {
! e.printStackTrace();
! }
}
}
/*************************************************************
* Callbacks from the AWTWindow and AWTView objc classes.