diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 78a5081f0..0e5def294 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -831,6 +831,11 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) } w = nxagentDefaultWindows[pScreen -> myNum]; + + /* + * override_redirect makes the window manager ignore the window and + * not add decorations, see ICCCM) + */ attributes.override_redirect = switchOn; valuemask = CWOverrideRedirect; XUnmapWindow(nxagentDisplay, w); @@ -1003,14 +1008,28 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) } } - if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0) + /* + * FIXME: These are 0 most of the time nowadays. The effect is, + * that the window is moving a bit to right/bottom every time + * fullscreen mode is left. To fix this query the frame extents + * from the window manager via _NET_REQUEST_FRAME_EXTENTS + */ + + if (nxagentOption(WMBorderWidth) > 0) { nxagentChangeOption(X, nxagentOption(SavedX) - nxagentOption(WMBorderWidth)); - nxagentChangeOption(Y, nxagentOption(SavedY) - nxagentOption(WMTitleHeight)); } else { nxagentChangeOption(X, nxagentOption(SavedX)); + } + + if (nxagentOption(WMTitleHeight) > 0) + { + nxagentChangeOption(Y, nxagentOption(SavedY) - nxagentOption(WMTitleHeight)); + } + else + { nxagentChangeOption(Y, nxagentOption(SavedY)); } @@ -2635,7 +2654,7 @@ void nxagentMapDefaultWindows(void) * Map the icon window. */ - if (nxagentIconWindow != 0) + if (nxagentIconWindow != None) { #ifdef TEST fprintf(stderr, "nxagentMapDefaultWindows: Mapping icon window id [%ld].\n", |