diff options
author | dgp <dgp@users.sourceforge.net> | 2007-10-11 16:04:45 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-10-11 16:04:45 (GMT) |
commit | 1b633c1a2c27d0385c2c8ceaa76592f1257ab869 (patch) | |
tree | 0477a2f8e8c1f9413c22a88c8623e2cb25e0cd19 | |
parent | c00d32330f15d04b803250101ebcf04910c6bd27 (diff) | |
download | tk-1b633c1a2c27d0385c2c8ceaa76592f1257ab869.zip tk-1b633c1a2c27d0385c2c8ceaa76592f1257ab869.tar.gz tk-1b633c1a2c27d0385c2c8ceaa76592f1257ab869.tar.bz2 |
merge updates from HEAD
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 15 |
2 files changed, 19 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2007-10-11 Daniel Steffen <das@users.sourceforge.net> + + * macosx/tkMacOSXWm.c (TkMacOSXGrowToplevel): manually constrain resize + limitBounds to maxBounds, works around SectRect() mis-feature (return + zero rect if input rect has zero height/width). [Bug 1810818] + 2007-10-09 Pat Thoyts <patthoyts@users.sourceforge.net> * generic/tkImage.c: Make Ttk_GetImage safe if called with NULL diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 944a419..9870969 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.49.2.5 2007/07/01 17:31:37 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.49.2.6 2007/10/11 16:04:45 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -4522,7 +4522,18 @@ TkMacOSXGrowToplevel( limitBounds.top = limits.top + (strBounds.top + strWidths.top); limitBounds.bottom = limits.bottom + (strBounds.top + strWidths.top + strWidths.bottom); - SectRect(&limitBounds, maxBounds, &limitBounds); + if (limitBounds.left < maxBounds->left) { + limitBounds.left = maxBounds->left; + } + if (limitBounds.right > maxBounds->right) { + limitBounds.right = maxBounds->right; + } + if (limitBounds.top < maxBounds->top) { + limitBounds.top = maxBounds->top; + } + if (limitBounds.bottom > maxBounds->bottom) { + limitBounds.bottom = maxBounds->bottom; + } limits.left = limitBounds.left - (strBounds.left + strWidths.left); limits.right = limitBounds.right - (strBounds.left + strWidths.left + strWidths.right); |