diff options
author | dgp <dgp@users.sourceforge.net> | 2008-06-26 21:26:08 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-06-26 21:26:08 (GMT) |
commit | 59b8b5c0158c797ff06c64328f41f4c278b3ef9c (patch) | |
tree | 432e612c028b0a88ff59336d540f5211fa1b9b36 | |
parent | 3fd4458cd1d116fb7a716bb2abf631104ea7e4a6 (diff) | |
download | tk-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).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | changes | 4 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 17 |
3 files changed, 20 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2008-06-26 Don Porter <dgp@users.sourceforge.net> + + * 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 <jenglish@users.sourceforge.net> * library/ttk/treeview.tcl: Backport fix for [Bug 1951733] @@ -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 <Enter> 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. */ |