Commit d16a5fbb authored by Ulrich Sibiller's avatar Ulrich Sibiller

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
parent 3c92b5db
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment