diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2021-01-30 16:19:21 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-02-03 14:52:53 +0100 |
commit | b09f5e03ec08bcbb9a614d5f2c0f86b28a203aef (patch) | |
tree | 3eba9f9d3f4593fe8b6c1e62f5d32643d44b7967 | |
parent | 6d8ccec751dd7de462936cd2b0920867055f0e2a (diff) | |
download | nx-libs-b09f5e03ec08bcbb9a614d5f2c0f86b28a203aef.tar.gz nx-libs-b09f5e03ec08bcbb9a614d5f2c0f86b28a203aef.tar.bz2 nx-libs-b09f5e03ec08bcbb9a614d5f2c0f86b28a203aef.zip |
Screen.c: Fix fullscreen (onescreen) at startup
Fixes ArcticaProject/nx-libs#991
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index a6b312aaa..c51302e6d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -322,6 +322,12 @@ Bool nxagentIsParentOf(Display *d, XlibWindow possible_parent, XlibWindow candid */ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) { + if (nxagentOption(Fullscreen) && !nxagentOption(AllScreens)) + { + nxagentSwitchFullscreen(pScreen, False); + return; + } + XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow); XIconifyWindow(nxagentDisplay, nxagentIconWindow, DefaultScreen(nxagentDisplay)); @@ -337,6 +343,12 @@ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) */ void nxagentMaximizeToFullScreen(ScreenPtr pScreen) { + if (nxagentOption(Fullscreen) && !nxagentOption(AllScreens)) + { + nxagentSwitchFullscreen(pScreen, True); + return; + } + /* XUnmapWindow(nxagentDisplay, nxagentIconWindow); */ @@ -992,8 +1004,25 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) nxagentChangeOption(X, 0); nxagentChangeOption(Y, 0); - nxagentChangeOption(Width, w); - nxagentChangeOption(Height, h); + /* + * Fullscreen will use the window manager on the remote X + * server. We need to size the window appropriately because the + * window manager stores the size and restores it when fullscreen + * mode is left. In AllScreens mode the window manager is + * instructed to not draw any window decorations. Here we need the + * full width to cover the whole screen. + */ + + if (nxagentOption(AllScreens)) + { + nxagentChangeOption(Width, w); + nxagentChangeOption(Height, h); + } + else + { + nxagentChangeOption(Width, w * 3 / 4); + nxagentChangeOption(Height, h * 3 / 4); + } /* first time screen initialization or resize during reconnect */ if (!nxagentReconnectTrap || nxagentResizeDesktopAtStartup) |