diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-06-27 21:03:03 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-06-27 21:03:03 +0200 |
commit | 1ebf7851994b3312d63bcf9e8f4f137128169261 (patch) | |
tree | 5a3f480a6373206e79c4a8f2797669e94bb05f5f /nx-X11/programs/Xserver/hw/nxagent/Window.c | |
parent | 5858ebc6da54fe24ba6dab61f1478c812bfa6fb2 (diff) | |
parent | 032ed3511bd6d2ef78c75e9296586ad5d469c0f1 (diff) | |
download | nx-libs-1ebf7851994b3312d63bcf9e8f4f137128169261.tar.gz nx-libs-1ebf7851994b3312d63bcf9e8f4f137128169261.tar.bz2 nx-libs-1ebf7851994b3312d63bcf9e8f4f137128169261.zip |
Merge branch 'uli42-pr/fix_fullscreen' into 3.6.x
Attributes GH PR #821: https://github.com/ArcticaProject/nx-libs/pull/821
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", |