mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
6682536: java\awt\FullScreen\NonfocusableFrameFullScreenTest\NonfocusableFrameFullScreenTest.java fails
Always-on-top property should be restored on exiting full-screen. Reviewed-by: tdv
This commit is contained in:
parent
9e5e0e9d44
commit
6aa1d81c2f
1 changed files with 7 additions and 0 deletions
|
@ -1107,6 +1107,10 @@ Java_sun_awt_Win32GraphicsDevice_exitFullScreenExclusive(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
jobject target = env->GetObjectField(windowPeer, AwtObject::targetID);
|
||||||
|
jboolean alwaysOnTop = JNU_GetFieldByName(env, NULL, target, "alwaysOnTop", "Z").z;
|
||||||
|
env->DeleteLocalRef(target);
|
||||||
|
|
||||||
if (!::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0,
|
if (!::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0,
|
||||||
SWP_NOMOVE|SWP_NOOWNERZORDER|SWP_NOSIZE))
|
SWP_NOMOVE|SWP_NOOWNERZORDER|SWP_NOSIZE))
|
||||||
{
|
{
|
||||||
|
@ -1114,6 +1118,9 @@ Java_sun_awt_Win32GraphicsDevice_exitFullScreenExclusive(
|
||||||
"Error %d unsetting topmost attribute to fs window",
|
"Error %d unsetting topmost attribute to fs window",
|
||||||
::GetLastError());
|
::GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We should restore alwaysOnTop state as it's anyway dropped here
|
||||||
|
Java_sun_awt_windows_WWindowPeer_setAlwaysOnTopNative(env, windowPeer, alwaysOnTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
CATCH_BAD_ALLOC;
|
CATCH_BAD_ALLOC;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue