From 55409abda8f00f6af3def7318ec66de03beded37 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 14 May 2008 08:29:05 +0000 Subject: Apply fix for [Bug 1639824] --- ChangeLog | 6 ++++++ generic/tkPanedWindow.c | 17 +++++++++++++---- 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 + + * 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 * 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. */ -- cgit v0.12