summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2004-04-21 02:45:21 (GMT)
committerjenglish <jenglish@flightlab.com>2004-04-21 02:45:21 (GMT)
commite3ccc9a83efec3a4d83bb8f8d8576a6f87123b8b (patch)
tree503152eb2e9d1133d26105c1465a30e04d758970
parent6df0f87c2b7371a450da4a6be3c698b0c150022c (diff)
downloadtk-e3ccc9a83efec3a4d83bb8f8d8576a6f87123b8b.zip
tk-e3ccc9a83efec3a4d83bb8f8d8576a6f87123b8b.tar.gz
tk-e3ccc9a83efec3a4d83bb8f8d8576a6f87123b8b.tar.bz2
Backported fix for bug #915350 "Tk sets min, max size in WM_HINTS when it
shouldn't" and #922336 "Tk apps have no maximize window button under KDE-3.2.1"
-rw-r--r--ChangeLog7
-rw-r--r--unix/tkUnixWm.c11
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 67ac5ca..d1848cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-04-20 Joe English <jenglish@users.sourceforge.net>
+
+ * unix/tkUnixWm.c: Backported fix for bug #915350
+ "Tk sets min, max size in WM_HINTS when it shouldn't"
+ and #922336 "Tk apps have no maximize window button under
+ KDE-3.2.1"
+
2004-04-16 Jeff Hobbs <jeffh@ActiveState.com>
* library/bgerror.tcl (bgerror): rework to only set -topmost bit
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 2a87d26..e36bc32 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.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: tkUnixWm.c,v 1.36 2002/12/27 21:23:04 jenglish Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.36.2.1 2004/04/21 02:45:22 jenglish Exp $
*/
#include "tkPort.h"
@@ -2277,6 +2277,13 @@ WmMaxsizeCmd(tkwin, winPtr, interp, objc, objv)
wmPtr->maxWidth = width;
wmPtr->maxHeight = height;
wmPtr->flags |= WM_UPDATE_SIZE_HINTS;
+
+ if (width <= 0 && height <= 0) {
+ wmPtr->sizeHintsFlags &= ~PMaxSize;
+ } else {
+ wmPtr->sizeHintsFlags |= PMaxSize;
+ }
+
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
@@ -4218,7 +4225,7 @@ UpdateSizeHints(winPtr)
hintsPtr->max_aspect.x = wmPtr->maxAspect.x;
hintsPtr->max_aspect.y = wmPtr->maxAspect.y;
hintsPtr->win_gravity = wmPtr->gravity;
- hintsPtr->flags = wmPtr->sizeHintsFlags | PMinSize | PMaxSize;
+ hintsPtr->flags = wmPtr->sizeHintsFlags | PMinSize;
/*
* If the window isn't supposed to be resizable, then set the