From d16a5fbb19c072b667be76633bc3f23f12ca82ef Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 12 Jan 2019 01:01:55 +0100 Subject: Screen.c: fix handling of fullscreen startup If nxagent is started in fullscreen mode take care the saved size (that is applied on exit of the fullscreen mode) will be configured correctly. Also respect a user provided -geometry option (had been ignored here previously). Fixes ArcticaProject/nx-libs#449 --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index bd0236ad4..19057dfe1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1019,10 +1019,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, /* first time screen initialization or resize during reconnect */ if (nxagentReconnectTrap == False || nxagentResizeDesktopAtStartup) { - nxagentChangeOption(RootWidth, w); - nxagentChangeOption(RootHeight, h); - - if (nxagentOption(RootWidth) > w) + if (nxagentOption(RootWidth) >= w) { nxagentChangeOption(SavedWidth, w * 3 / 4); } @@ -1031,7 +1028,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentChangeOption(SavedWidth, nxagentOption(RootWidth)); } - if (nxagentOption(RootHeight) > h) + if (nxagentOption(RootHeight) >= h) { nxagentChangeOption(SavedHeight, h * 3 / 4); } @@ -1040,6 +1037,9 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentChangeOption(SavedHeight, nxagentOption(RootHeight)); } + nxagentChangeOption(RootWidth, w); + nxagentChangeOption(RootHeight, h); + nxagentChangeOption(RootX, 0); nxagentChangeOption(RootY, 0); } -- cgit v1.2.3