summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenglish@flightlab.com <jenglish>2004-04-04 20:08:39 (GMT)
committerjenglish@flightlab.com <jenglish>2004-04-04 20:08:39 (GMT)
commit403ea9a5b38b85773260e9c154f63c71045988e2 (patch)
tree0e6ceb40def3be89d904c5f7df6b83970e484fd7
parenteed32a78627f6ce47ffda2eae55cc7027458cf03 (diff)
downloadtk-403ea9a5b38b85773260e9c154f63c71045988e2.zip
tk-403ea9a5b38b85773260e9c154f63c71045988e2.tar.gz
tk-403ea9a5b38b85773260e9c154f63c71045988e2.tar.bz2
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--ChangeLog5
-rw-r--r--unix/tkUnixWm.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4121177..3208996 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-04 Joe English <jenglish@users.sourceforge.net>
+ * unix/tkUnixWm.c: 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-03-31 Jim Ingham <jingham@apple.com>
* tkMacOSXCarbonEvents.c (AppEventHandlerProc): Handle the
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index b52b439..94162bd 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.40 2004/01/31 20:27:52 jenglish Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.41 2004/04/04 20:08:39 jenglish Exp $
*/
#include "tkPort.h"
@@ -2279,6 +2279,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;
}
@@ -4269,7 +4276,7 @@ UpdateSizeHints(winPtr, newWidth, newHeight)
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