Workaround for when initial window size isn't what we requested.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4376 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index 7ce36b4..5628142 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -57,6 +57,12 @@
setName(name);
show();
+
+ // The window manager might give us an initial window size that is different
+ // than the one we requested, and in those cases we need to manually adjust
+ // the scroll widget for things to behave sanely.
+ if ((w != this->w()) || (h != this->h()))
+ scroll->size(this->w(), this->h());
}