Revision: 4233
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4233&view=rev
Author:   atkac
Date:     2011-01-17 10:34:55 +0000 (Mon, 17 Jan 2011)

Log Message:
-----------
[Bugfix] TXViewport: set the window max width/height considering the scrollbars

Thanks to Paulo Zanoni for the patch.

Modified Paths:
--------------
    trunk/unix/tx/TXViewport.cxx

Modified: trunk/unix/tx/TXViewport.cxx
===================================================================
--- trunk/unix/tx/TXViewport.cxx        2011-01-07 12:44:43 UTC (rev 4232)
+++ trunk/unix/tx/TXViewport.cxx        2011-01-17 10:34:55 UTC (rev 4233)
@@ -118,11 +118,22 @@
 
 void TXViewport::resizeNotify()
 {
+  int winMaxWidth, winMaxHeight;
+
+  winMaxWidth = child->width();
+  winMaxHeight = child->height();
+
   needXScrollbar = (!bumpScroll && width() < child->width() &&
                    height() > scrollbarSize && width() > scrollbarSize);
   needYScrollbar = (!bumpScroll && height() < child->height() &&
                    height() > scrollbarSize && width() > scrollbarSize);
 
+  if (needXScrollbar)
+    winMaxHeight += scrollbarSize;
+  if (needYScrollbar)
+    winMaxWidth += scrollbarSize;
+  setMaxSize(winMaxWidth, winMaxHeight);
+
   if (needXScrollbar && needYScrollbar) {
     clipper->resize(width()-scrollbarSize, height()-scrollbarSize);
     hScrollbar->map();


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to