summaryrefslogtreecommitdiffstats
path: root/generic/tkPanedWindow.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-06-26 21:26:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-06-26 21:26:08 (GMT)
commit59b8b5c0158c797ff06c64328f41f4c278b3ef9c (patch)
tree432e612c028b0a88ff59336d540f5211fa1b9b36 /generic/tkPanedWindow.c
parent3fd4458cd1d116fb7a716bb2abf631104ea7e4a6 (diff)
downloadtk-59b8b5c0158c797ff06c64328f41f4c278b3ef9c.zip
tk-59b8b5c0158c797ff06c64328f41f4c278b3ef9c.tar.gz
tk-59b8b5c0158c797ff06c64328f41f4c278b3ef9c.tar.bz2
* generic/tkPanedWindow.c (PanedWindowProxyCommand)
(DisplayPanedWindow): Ensure that a zero width never gets fed to the underlying window system. [Bug 1639824] (Backport fix from dkf).
Diffstat (limited to 'generic/tkPanedWindow.c')
-rw-r--r--generic/tkPanedWindow.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 7854498..10c406b 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPanedWindow.c,v 1.30 2007/12/13 15:24:16 dgp Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.30.2.1 2008/06/26 21:26:09 dgp Exp $
*/
#include "default.h"
@@ -1459,9 +1459,11 @@ DisplayPanedWindow(
if (slavePtr->hide) {
continue;
}
- Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background,
- slavePtr->sashx, slavePtr->sashy,
- sashWidth, sashHeight, 1, pwPtr->sashRelief);
+ if (sashWidth > 0 && sashHeight > 0) {
+ Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background,
+ slavePtr->sashx, slavePtr->sashy, sashWidth, sashHeight,
+ 1, pwPtr->sashRelief);
+ }
if (pwPtr->showHandle) {
Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background,
slavePtr->handlex, slavePtr->handley,
@@ -2831,6 +2833,13 @@ PanedWindowProxyCommand(
(2 * Tk_InternalBorderWidth(pwPtr->tkwin));
}
+ if (sashWidth < 1) {
+ sashWidth = 1;
+ }
+ if (sashHeight < 1) {
+ sashHeight = 1;
+ }
+
/*
* Stash the proxy coordinates for future "proxy coord" calls.
*/