]> source.dussan.org Git - tigervnc.git/commitdiff
Workaround for when initial window size isn't what we requested.
authorPierre Ossman <ossman@cendio.se>
Fri, 15 Apr 2011 14:09:09 +0000 (14:09 +0000)
committerPierre Ossman <ossman@cendio.se>
Fri, 15 Apr 2011 14:09:09 +0000 (14:09 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4376 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/DesktopWindow.cxx

index 7ce36b4fe8ee2e828ccb24878e376dff403cb8af..5628142ac42dfc8f411882433571c4b8865de2fb 100644 (file)
@@ -57,6 +57,12 @@ DesktopWindow::DesktopWindow(int w, int h, const char *name,
   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());
 }