< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
Print this page
*** 61,70 ****
--- 61,71 ----
private static native void nativeRevalidateNSWindowShadow(long nsWindowPtr);
private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
private static native void nativeSynthesizeMouseEnteredExitedEvents();
+ private static native void nativeSynthesizeMouseEnteredExitedEvents(long nsWindowPtr, int eventType);
private static native void nativeDispose(long nsWindowPtr);
private static native void nativeEnterFullScreenMode(long nsWindowPtr);
private static native void nativeExitFullScreenMode(long nsWindowPtr);
static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
*** 823,832 ****
--- 824,840 ----
public void setModalBlocked(boolean blocked) {
if (target.getModalExclusionType() == Dialog.ModalExclusionType.APPLICATION_EXCLUDE) {
return;
}
+ if (blocked) {
+ // We are going to show a modal window. Previously displayed window will be
+ // blocked/disabled. So we have to send mouse exited event to it now, since
+ // all mouse events are discarded for blocked/disabled windows.
+ nativeSynthesizeMouseEnteredExitedEvents(getNSWindowPtr(), CocoaConstants.NSMouseExited);
+ }
+
nativeSetEnabled(getNSWindowPtr(), !blocked);
checkBlockingAndOrder();
}
public final void invalidateShadow(){
< prev index next >