Skip to content

Commit

Permalink
Remove maximum size limits for nxagent window
Browse files Browse the repository at this point in the history
Set maximum size to MAXSHORT (32767).

This especially helps when reconnecting to a session that had
initially been started from a client with a small(er) screen. Before
it was impossible to increase the maximum size of a running session
beyond the screen size of the client that had initiated the session.

This change, together with the previous commit, fixes #472
  • Loading branch information
uli42 committed Jul 11, 2017
1 parent 615bf96 commit 8eb3531
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions nx-X11/programs/Xserver/hw/nxagent/Events.c
Expand Up @@ -614,8 +614,8 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
NXSetExposeParameters(nxagentDisplay, 0, 0, 0);
}

sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_width = MAXSHORT;
sizeHints.max_height = MAXSHORT;

XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
&sizeHints);
Expand Down Expand Up @@ -655,8 +655,8 @@ void nxagentShadowSwitchResizeMode(ScreenPtr pScreen)
screenInfo.screens[0]->root, screenInfo.screens[0]->root -> drawable.width,
screenInfo.screens[0]->root -> drawable.height);

sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_width = MAXSHORT;
sizeHints.max_height = MAXSHORT;

fprintf(stderr,"Info: Enabled resize mode in shadow agent.\n");
}
Expand Down
12 changes: 6 additions & 6 deletions nx-X11/programs/Xserver/hw/nxagent/Screen.c
Expand Up @@ -1854,8 +1854,8 @@ N/A

if (nxagentOption(DesktopResize) == 1 || nxagentOption(Fullscreen) == 1)
{
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_width = MAXSHORT;
sizeHints.max_height = MAXSHORT;
}
else
{
Expand Down Expand Up @@ -2377,8 +2377,8 @@ FIXME: We should try to restore the previously

if (nxagentOption(DesktopResize) == 1)
{
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_width = MAXSHORT;
sizeHints.max_height = MAXSHORT;
}
else
{
Expand Down Expand Up @@ -4414,8 +4414,8 @@ void nxagentSetWMNormalHints(int screen)

if (nxagentOption(DesktopResize) == 1)
{
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_width = MAXSHORT;
sizeHints.max_height = MAXSHORT;
}
else
{
Expand Down

0 comments on commit 8eb3531

Please sign in to comment.