JBR-3098 move repaintPeer event from AppKit thread to EDT on macos

This commit is contained in:
Dmitrii
2024-01-12 12:29:34 +01:00
committed by jbrbot
parent d31e111c00
commit f13d5a409d

View File

@@ -745,7 +745,11 @@ public class LWWindowPeer
}
if (tResized || pResized || invalid || isNewDevice) {
handleResize(w, h, true);
repaintPeer();
// Changing window size fires up the execution of the current method on AppKit thread and as result it could
// leads to race condition with paint event on EDT. Running repaintPeer on EDT eliminates such issue.
SunToolkit.executeOnEventHandlerThread(getTarget(), () -> {
repaintPeer();
});
}
repositionSecurityWarning();