summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkPanedWindow.c17
2 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 14541db..0c27119 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-14 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tkPanedWindow.c (PanedWindowProxyCommand)
+ (DisplayPanedWindow): Ensure that a zero width never gets fed to the
+ underlying window system. [Bug 1639824]
+
2008-05-13 Pat Thoyts <patthoyts@users.sourceforge.net>
* library/console.tcl: Support pixel sized font in +/- keybinding.
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index f80e257..cffac53 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.31 2008/04/27 22:38:56 dkf Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.32 2008/05/14 08:29:07 dkf 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.
*/