From 59b8b5c0158c797ff06c64328f41f4c278b3ef9c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 26 Jun 2008 21:26:08 +0000 Subject: * generic/tkPanedWindow.c (PanedWindowProxyCommand) (DisplayPanedWindow): Ensure that a zero width never gets fed to the underlying window system. [Bug 1639824] (Backport fix from dkf). --- ChangeLog | 6 ++++++ changes | 4 +--- generic/tkPanedWindow.c | 17 +++++++++++++---- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 241c734..ea5606b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-26 Don Porter + + * generic/tkPanedWindow.c (PanedWindowProxyCommand) + (DisplayPanedWindow): Ensure that a zero width never gets fed to the + underlying window system. [Bug 1639824] (Backport fix from dkf). + 2008-06-20 Joe English * library/ttk/treeview.tcl: Backport fix for [Bug 1951733] diff --git a/changes b/changes index 13f042e..311db62 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.130.2.2 2008/06/20 13:57:51 das Exp $ +RCS: @(#) $Id: changes,v 1.130.2.3 2008/06/26 21:26:08 dgp Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -6508,8 +6508,6 @@ Several documentation and release notes improvements 2008-04-14 (bug fix)[1941740] [tk_chooseColor -title] (thoyts) -2008-04-16 (interface)[1938497] make stubs tables 'static const' (steffen) - 2008-04-17 (bug fix)[1327482] canvas item events (wangnick) 2008-05-23 (bug fix)[1967576] ttk::label height or width 0 panic (lawlor) 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. */ -- cgit v0.12