summaryrefslogtreecommitdiffstats
path: root/vncviewer/DesktopWindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vncviewer/DesktopWindow.cxx')
-rw-r--r--vncviewer/DesktopWindow.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index 3579618e..423d2df3 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -658,12 +658,20 @@ void DesktopWindow::maximizeWindow()
void DesktopWindow::handleDesktopSize()
{
- int width, height;
+ if (desktopSize.hasBeenSet()) {
+ int width, height;
- if (sscanf(desktopSize.getValueStr(), "%dx%d", &width, &height) != 2)
- return;
+ // An explicit size has been requested
+
+ if (sscanf(desktopSize.getValueStr(), "%dx%d", &width, &height) != 2)
+ return;
- remoteResize(width, height);
+ remoteResize(width, height);
+ } else if (::remoteResize) {
+ // No explicit size, but remote resizing is on so make sure it
+ // matches whatever size the window ended up being
+ remoteResize(w(), h());
+ }
}