diff options
author | Sven Gothel <[email protected]> | 2011-09-07 01:32:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-07 01:32:22 +0200 |
commit | e1ecd85a9d5877861cde35baababb298d1339898 (patch) | |
tree | 6606557af3995f026166b4d7bcf67c5b77a4e751 /src/newt/native/WindowsWindow.c | |
parent | 3766fc329ec27c09f7e71bbf705defc44a8bedac (diff) |
NEWT/Window: Cleanup Actions: Reparenting, Fullscreen and Decoration
- don't assume size/pos change - hence don't set window's values, but wait for satisfaction
- don't send resize events on our own, just rely on the event mechanism
- fullscreen: don't wrap action around invisibility from Java, Win7 flashes otherwise.
Clients who benefit from it (X11) impl. it natively.
- fullscreen exit: validate pos/size in case of a child window, like reparenting.
Otherwise the container might gets confused (eg. AWT).
Diffstat (limited to 'src/newt/native/WindowsWindow.c')
-rw-r--r-- | src/newt/native/WindowsWindow.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index 9e635ef40..900b5a037 100644 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -1452,19 +1452,17 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_reconfigure windowStyle |= WS_VISIBLE ; } - if( TST_FLAG_CHANGE_FULLSCREEN(flags) && !TST_FLAG_IS_FULLSCREEN(flags) ) { // FS off - NewtWindows_setFullScreen(JNI_FALSE); - } - // order of call sequence: (MS documentation) // TOP: SetParent(.., NULL); Clear WS_CHILD [, Set WS_POPUP] // CHILD: Set WS_CHILD [, Clear WS_POPUP]; SetParent(.., PARENT) // if( TST_FLAG_CHANGE_PARENTING(flags) && NULL == hwndP ) { + // TOP: in -> out SetParent(hwnd, NULL); } if( TST_FLAG_CHANGE_FULLSCREEN(flags) && TST_FLAG_IS_FULLSCREEN(flags) ) { // FS on + // TOP: in -> out NewtWindows_setFullScreen(JNI_TRUE); } @@ -1480,7 +1478,13 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_reconfigure SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER ); } + if( TST_FLAG_CHANGE_FULLSCREEN(flags) && !TST_FLAG_IS_FULLSCREEN(flags) ) { // FS off + // CHILD: out -> in + NewtWindows_setFullScreen(JNI_FALSE); + } + if ( TST_FLAG_CHANGE_PARENTING(flags) && NULL != hwndP ) { + // CHILD: out -> in SetParent(hwnd, hwndP ); } |