diff options
Diffstat (limited to 'src/newt')
-rwxr-xr-x | src/newt/native/WindowsWindow.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index a3ff7d6c7..b500e3217 100755 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -1293,6 +1293,17 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_impl_windows_WindowsWindow_setFullsc HWND hWndInsertAfter; DWORD windowStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VISIBLE; + if ( JNI_TRUE == on ) { + hwndP = NULL; // full-screen is top level + } + + // order of call sequence: (MS documentation) + // SetParent(.., NULL), SetWindowLong ( WS_POPUP ) + // SetParent(.., PARENT), SetWindowLong ( WS_CHILD ) + if ( NULL == hwndP ) { + SetParent(hwnd, NULL); + } + if(NULL!=hwndP) { windowStyle |= WS_CHILD ; } else if (bIsUndecorated || on) { @@ -1302,6 +1313,10 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_impl_windows_WindowsWindow_setFullsc } SetWindowLong(hwnd, GWL_STYLE, windowStyle); + if ( NULL != hwndP ) { + SetParent(hwnd, hwndP ); + } + if(on==JNI_TRUE) { flags = SWP_SHOWWINDOW; hWndInsertAfter = HWND_TOPMOST; @@ -1312,7 +1327,7 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_impl_windows_WindowsWindow_setFullsc SetWindowPos(hwnd, hWndInsertAfter, x, y, width, height, flags); - NewtWindows_requestFocus ( wnd ); + NewtWindows_requestFocus ( hwnd ); (*env)->CallVoidMethod(env, obj, sizeChangedID, (jint) width, (jint) height); } |