Revision: 4234
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4234&view=rev
Author: atkac
Date: 2011-01-17 10:35:46 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
[Bugfix] TXViewport: check if we need another scrollbar after adding one
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-17 10:34:55 UTC (rev 4233)
+++ trunk/unix/tx/TXViewport.cxx 2011-01-17 10:35:46 UTC (rev 4234)
@@ -123,10 +123,19 @@
winMaxWidth = child->width();
winMaxHeight = child->height();
- needXScrollbar = (!bumpScroll && width() < child->width() &&
- height() > scrollbarSize && width() > scrollbarSize);
- needYScrollbar = (!bumpScroll && height() < child->height() &&
- height() > scrollbarSize && width() > scrollbarSize);
+ needXScrollbar = false;
+ needYScrollbar = false;
+ if (!bumpScroll && height() > scrollbarSize && width() > scrollbarSize) {
+ needXScrollbar = (width() < child->width());
+ needYScrollbar = (height() < child->height());
+ // Adding an horizontal scrollbar occupies space, which might cause the
+ // need to add a vertical scrollbar, and vice-versa. These additional
+ // checks should solve this problem
+ if (needXScrollbar && (height() - scrollbarSize < child->height()))
+ needYScrollbar = true;
+ if (needYScrollbar && (width() - scrollbarSize < child->width()))
+ needXScrollbar = true;
+ }
if (needXScrollbar)
winMaxHeight += scrollbarSize;
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