Unverified Commit f696a57f authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/fix_onescreen' into 3.6.x

parents 770f468c 06724dfe
...@@ -322,6 +322,12 @@ Bool nxagentIsParentOf(Display *d, XlibWindow possible_parent, XlibWindow candid ...@@ -322,6 +322,12 @@ Bool nxagentIsParentOf(Display *d, XlibWindow possible_parent, XlibWindow candid
*/ */
void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) void nxagentMinimizeFromFullScreen(ScreenPtr pScreen)
{ {
if (nxagentOption(Fullscreen) && !nxagentOption(AllScreens))
{
nxagentSwitchFullscreen(pScreen, False);
return;
}
XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow); XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow);
XIconifyWindow(nxagentDisplay, nxagentIconWindow, XIconifyWindow(nxagentDisplay, nxagentIconWindow,
DefaultScreen(nxagentDisplay)); DefaultScreen(nxagentDisplay));
...@@ -337,6 +343,12 @@ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) ...@@ -337,6 +343,12 @@ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen)
*/ */
void nxagentMaximizeToFullScreen(ScreenPtr pScreen) void nxagentMaximizeToFullScreen(ScreenPtr pScreen)
{ {
if (nxagentOption(Fullscreen) && !nxagentOption(AllScreens))
{
nxagentSwitchFullscreen(pScreen, True);
return;
}
/* /*
XUnmapWindow(nxagentDisplay, nxagentIconWindow); XUnmapWindow(nxagentDisplay, nxagentIconWindow);
*/ */
...@@ -471,8 +483,8 @@ Window nxagentCreateIconWindow(void) ...@@ -471,8 +483,8 @@ Window nxagentCreateIconWindow(void)
if (-1 == asprintf(&winname, "%s Icon", nxagentWindowName)) if (-1 == asprintf(&winname, "%s Icon", nxagentWindowName))
{ {
/* If memory allocation wasn't possible, or some other error /* If memory allocation wasn't possible, or some other error
occurs, these functions will return -1, and the contents of occurs, asprintf() will return -1, and the content of
winname are undefined. */ winname is undefined. */
winname = NULL; winname = NULL;
} }
#endif #endif
...@@ -992,8 +1004,25 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) ...@@ -992,8 +1004,25 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
nxagentChangeOption(X, 0); nxagentChangeOption(X, 0);
nxagentChangeOption(Y, 0); nxagentChangeOption(Y, 0);
/*
* 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(Width, w);
nxagentChangeOption(Height, h); nxagentChangeOption(Height, h);
}
else
{
nxagentChangeOption(Width, w * 3 / 4);
nxagentChangeOption(Height, h * 3 / 4);
}
/* first time screen initialization or resize during reconnect */ /* first time screen initialization or resize during reconnect */
if (!nxagentReconnectTrap || nxagentResizeDesktopAtStartup) if (!nxagentReconnectTrap || nxagentResizeDesktopAtStartup)
......
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