aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-02-03 14:49:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-02-03 14:49:32 +0100
commitf696a57f8f17b87deca8079ac9a71d184bfedb53 (patch)
treeeaff39b33dca4eb4fb4e77e2dcf27b5a41f332d4
parent770f468cd56cdd4c82bf4973a3505a3e8e4f01b4 (diff)
parent06724dfe03bcff422a7d518841757f4fa2e563f6 (diff)
downloadnx-libs-f696a57f8f17b87deca8079ac9a71d184bfedb53.tar.gz
nx-libs-f696a57f8f17b87deca8079ac9a71d184bfedb53.tar.bz2
nx-libs-f696a57f8f17b87deca8079ac9a71d184bfedb53.zip
Merge branch 'uli42-pr/fix_onescreen' into 3.6.x
Attributes GH PR #995: https://github.com/ArcticaProject/nx-libs/pull/995
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c37
1 files changed, 33 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index a6b312aaa..b87c1e225 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);
*/
@@ -471,8 +483,8 @@ Window nxagentCreateIconWindow(void)
if (-1 == asprintf(&winname, "%s Icon", nxagentWindowName))
{
/* If memory allocation wasn't possible, or some other error
- occurs, these functions will return -1, and the contents of
- winname are undefined. */
+ occurs, asprintf() will return -1, and the content of
+ winname is undefined. */
winname = NULL;
}
#endif
@@ -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)