Skip to content

Commit 8eb3531

Browse files
committed
Remove maximum size limits for nxagent window
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
1 parent 615bf96 commit 8eb3531

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

nx-X11/programs/Xserver/hw/nxagent/Events.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
614614
NXSetExposeParameters(nxagentDisplay, 0, 0, 0);
615615
}
616616

617-
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
618-
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
617+
sizeHints.max_width = MAXSHORT;
618+
sizeHints.max_height = MAXSHORT;
619619

620620
XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
621621
&sizeHints);
@@ -655,8 +655,8 @@ void nxagentShadowSwitchResizeMode(ScreenPtr pScreen)
655655
screenInfo.screens[0]->root, screenInfo.screens[0]->root -> drawable.width,
656656
screenInfo.screens[0]->root -> drawable.height);
657657

658-
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
659-
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
658+
sizeHints.max_width = MAXSHORT;
659+
sizeHints.max_height = MAXSHORT;
660660

661661
fprintf(stderr,"Info: Enabled resize mode in shadow agent.\n");
662662
}

nx-X11/programs/Xserver/hw/nxagent/Screen.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,8 +1854,8 @@ N/A
18541854

18551855
if (nxagentOption(DesktopResize) == 1 || nxagentOption(Fullscreen) == 1)
18561856
{
1857-
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
1858-
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
1857+
sizeHints.max_width = MAXSHORT;
1858+
sizeHints.max_height = MAXSHORT;
18591859
}
18601860
else
18611861
{
@@ -2377,8 +2377,8 @@ FIXME: We should try to restore the previously
23772377

23782378
if (nxagentOption(DesktopResize) == 1)
23792379
{
2380-
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
2381-
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
2380+
sizeHints.max_width = MAXSHORT;
2381+
sizeHints.max_height = MAXSHORT;
23822382
}
23832383
else
23842384
{
@@ -4414,8 +4414,8 @@ void nxagentSetWMNormalHints(int screen)
44144414

44154415
if (nxagentOption(DesktopResize) == 1)
44164416
{
4417-
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
4418-
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
4417+
sizeHints.max_width = MAXSHORT;
4418+
sizeHints.max_height = MAXSHORT;
44194419
}
44204420
else
44214421
{

0 commit comments

Comments
 (0)