summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkPanedWindow.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 9d72509..eb0108f 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.14 2003/05/21 15:31:01 dkf Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.15 2003/07/17 00:39:53 hobbs Exp $
*/
#include "tkPort.h"
@@ -1643,9 +1643,12 @@ ArrangePanes(clientData)
if (pwPtr->orient == ORIENT_HORIZONTAL) {
paneWidth = slavePtr->paneWidth;
if (i == pwPtr->numSlaves - 1 && Tk_IsMapped(pwPtr->tkwin)) {
- if (Tk_Width(pwPtr->tkwin) > Tk_ReqWidth(pwPtr->tkwin)) {
+ if (Tk_Width(pwPtr->tkwin) != Tk_ReqWidth(pwPtr->tkwin)) {
paneWidth += Tk_Width(pwPtr->tkwin) -
Tk_ReqWidth(pwPtr->tkwin);
+ if (paneWidth < 0) {
+ paneWidth = 0;
+ }
}
}
paneHeight = Tk_Height(pwPtr->tkwin) - (2 * slavePtr->pady) -
@@ -1653,9 +1656,12 @@ ArrangePanes(clientData)
} else {
paneHeight = slavePtr->paneHeight;
if (i == pwPtr->numSlaves - 1 && Tk_IsMapped(pwPtr->tkwin)) {
- if (Tk_Height(pwPtr->tkwin) > Tk_ReqHeight(pwPtr->tkwin)) {
+ if (Tk_Height(pwPtr->tkwin) != Tk_ReqHeight(pwPtr->tkwin)) {
paneHeight += Tk_Height(pwPtr->tkwin) -
Tk_ReqHeight(pwPtr->tkwin);
+ if (paneHeight < 0) {
+ paneHeight = 0;
+ }
}
}
paneWidth = Tk_Width(pwPtr->tkwin) - (2 * slavePtr->padx) -