diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2003-07-17 20:48:59 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2003-07-17 20:48:59 (GMT) |
commit | 11b8eef0ec7b6218097e96895b0aaab38fbd2097 (patch) | |
tree | 0e812a896216448250395b18ea1fe325146f5beb /generic | |
parent | 8504539873c10d2259b835f26f33b9684d610503 (diff) | |
download | tk-11b8eef0ec7b6218097e96895b0aaab38fbd2097.zip tk-11b8eef0ec7b6218097e96895b0aaab38fbd2097.tar.gz tk-11b8eef0ec7b6218097e96895b0aaab38fbd2097.tar.bz2 |
Panedwindow fixes that make things behave right in complex geometry cases.
[Bugs 738143+747814]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkPanedWindow.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 60b938a..9763487 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.2.1 2003/07/17 00:37:03 hobbs Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.2 2003/07/17 20:49:00 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); } } |