summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-05-21 15:30:59 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-05-21 15:30:59 (GMT)
commitd3db5961e94351eb876bbe09cc75822a98464b6a (patch)
tree011b9df6bf2b13e6af3da7a024567e6129761a4b /generic
parentfe602f5a24681408ee16726ec05ac74f8ead5a7e (diff)
downloadtk-d3db5961e94351eb876bbe09cc75822a98464b6a.zip
tk-d3db5961e94351eb876bbe09cc75822a98464b6a.tar.gz
tk-d3db5961e94351eb876bbe09cc75822a98464b6a.tar.bz2
The panedwindow widget now sizes right around unmapped windows. [Bug 738143]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkPanedWindow.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index a096c75..9d72509 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.13 2003/02/21 11:48:54 dkf Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.14 2003/05/21 15:31:01 dkf Exp $
*/
#include "tkPort.h"
@@ -1518,14 +1518,21 @@ PanedWindowReqProc(clientData, tkwin)
Tk_Window tkwin; /* Other Tk-related information
* about the window. */
{
- Slave *panePtr = (Slave *) clientData;
- PanedWindow *pwPtr = (PanedWindow *) (panePtr->masterPtr);
+ Slave *slavePtr = (Slave *) clientData;
+ PanedWindow *pwPtr = (PanedWindow *) (slavePtr->masterPtr);
if (Tk_IsMapped(pwPtr->tkwin)) {
if (!(pwPtr->flags & RESIZE_PENDING)) {
pwPtr->flags |= RESIZE_PENDING;
Tcl_DoWhenIdle(ArrangePanes, (ClientData) pwPtr);
}
} else {
+ int doubleBw = 2 * Tk_Changes(slavePtr->tkwin)->border_width;
+ if (slavePtr->width <= 0) {
+ slavePtr->paneWidth = Tk_ReqWidth(slavePtr->tkwin) + doubleBw;
+ }
+ if (slavePtr->height <= 0) {
+ slavePtr->paneHeight = Tk_ReqHeight(slavePtr->tkwin) + doubleBw;
+ }
ComputeGeometry(pwPtr);
}
}