diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-11-11 13:59:01 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-11-11 13:59:01 +0100 |
commit | bad31c2fb8503554b28966e8d40715e269088ba0 (patch) | |
tree | 8b7e95cd461a366e9fd716ce24ecf7d18dadd6f2 /vncviewer | |
parent | 71d66663985cc19ef6d1947b36e668c2734641ac (diff) | |
download | tigervnc-bad31c2fb8503554b28966e8d40715e269088ba0.tar.gz tigervnc-bad31c2fb8503554b28966e8d40715e269088ba0.zip |
Make sure we do an initial resize
The local window manager might give us a window of a different size
than the one we request. Make sure that the remote resize setting
gets respected even in this case.
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 16 |
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()); + } } |