diff options
author | Sven Gothel <[email protected]> | 2015-10-09 02:24:05 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-09 02:24:05 +0200 |
commit | ecdaa59aa48c16a558ec7a0b50df9419a9ccedc1 (patch) | |
tree | 461a1dc54870e2cbc83988b40ed07468d7c8577a /src/newt/native | |
parent | 8ce5203a581e731d5aa7d553455b04213d94115c (diff) |
Bug 1249 - NEWT X11: setVisible(false) IconicState/_NET_WM_STATE_HIDDEN: Handle case where KDE unmaps the window
Update our internal JavaWindow.isMapped according to MapNotify and UnmapNotify.
This takes care of a situation (KDE) where a window is unmapped
during IconicState.
For unmapped windows we cannot interprete _NET_WM_STATE_HIDDEN
and we have to issue XMapWindow for restoring the window.
Diffstat (limited to 'src/newt/native')
-rw-r--r-- | src/newt/native/X11Display.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/newt/native/X11Display.c b/src/newt/native/X11Display.c index a98f707ca..ab5afd1d6 100644 --- a/src/newt/native/X11Display.c +++ b/src/newt/native/X11Display.c @@ -662,11 +662,12 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_DisplayDriver_DispatchMessage break; case MapNotify: - DBG_PRINT( "X11: event . MapNotify call Event %p, Window %p, override_redirect %d, child-event: %d\n", - (void*)evt.xmap.event, (void*)evt.xmap.window, (int)evt.xmap.override_redirect, + DBG_PRINT( "X11: event . MapNotify call Event %p, Window %p, isMapped %d -> 1, override_redirect %d, child-event: %d\n", + (void*)evt.xmap.event, (void*)evt.xmap.window, jw->isMapped, (int)evt.xmap.override_redirect, evt.xmap.event!=evt.xmap.window); if( evt.xmap.event == evt.xmap.window ) { // ignore child window notification + jw->isMapped = True; // insets: negative values are ignored int left=-1, right=-1, top=-1, bottom=-1; if( NewtWindows_updateInsets(dpy, jw, &left, &right, &top, &bottom) ) { @@ -678,11 +679,12 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_DisplayDriver_DispatchMessage break; case UnmapNotify: - DBG_PRINT( "X11: event . UnmapNotify call Event %p, Window %p, from_configure %d, child-event: %d\n", - (void*)evt.xunmap.event, (void*)evt.xunmap.window, (int)evt.xunmap.from_configure, + DBG_PRINT( "X11: event . UnmapNotify call Event %p, Window %p, isMapped %d -> 0, from_configure %d, child-event: %d\n", + (void*)evt.xunmap.event, (void*)evt.xunmap.window, jw->isMapped, (int)evt.xunmap.from_configure, evt.xunmap.event!=evt.xunmap.window); if( evt.xunmap.event == evt.xunmap.window ) { // ignore child window notification + jw->isMapped = False; (*env)->CallVoidMethod(env, jw->jwindow, visibleChangedID, JNI_FALSE, JNI_FALSE); } break; |