summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-11-17 22:46:12 (GMT)
committerhobbs <hobbs>2004-11-17 22:46:12 (GMT)
commitbe0dcd9c9fe40b3e3b42c40165565551ba19e8b4 (patch)
tree6bd19439bf365e850b74deda0d6bf27537a52c5d
parentd19c6f6d9fea8ff46384afc9602252e3ecd2d3cd (diff)
downloadtk-be0dcd9c9fe40b3e3b42c40165565551ba19e8b4.zip
tk-be0dcd9c9fe40b3e3b42c40165565551ba19e8b4.tar.gz
tk-be0dcd9c9fe40b3e3b42c40165565551ba19e8b4.tar.bz2
* generic/tkCanvWind.c (ConfigureWinItem): unmap windows
immediately when state hidden is requested. [Bug 982248]
-rw-r--r--ChangeLog3
-rw-r--r--generic/tkCanvWind.c18
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 97a8129..a68f22d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2004-11-17 Jeff Hobbs <jeffh@ActiveState.com>
+ * generic/tkCanvWind.c (ConfigureWinItem): unmap windows
+ immediately when state hidden is requested. [Bug 982248]
+
* generic/tkCanvImg.c (ImageToPostscript): don't try ps generation
of canvas image item without image specified. [Bug 1032300]
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index bc4d1fe..a5e05c6 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvWind.c,v 1.10 2004/01/13 02:06:00 davygrvy Exp $
+ * RCS: @(#) $Id: tkCanvWind.c,v 1.11 2004/11/17 22:46:12 hobbs Exp $
*/
#include <stdio.h>
@@ -382,6 +382,14 @@ ConfigureWinItem(interp, canvas, itemPtr, objc, objv, flags)
(ClientData) winItemPtr);
}
}
+ if ((winItemPtr->tkwin != NULL)
+ && (itemPtr->state == TK_STATE_HIDDEN)) {
+ if (canvasTkwin == Tk_Parent(winItemPtr->tkwin)) {
+ Tk_UnmapWindow(winItemPtr->tkwin);
+ } else {
+ Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
+ }
+ }
ComputeWindowBbox(canvas, winItemPtr);
@@ -588,11 +596,15 @@ DisplayWinItem(canvas, itemPtr, display, drawable, regionX, regionY,
if (winItemPtr->tkwin == NULL) {
return;
}
- if(state == TK_STATE_NULL) {
+ if (state == TK_STATE_NULL) {
state = ((TkCanvas *)canvas)->canvas_state;
}
if (state == TK_STATE_HIDDEN) {
- Tk_UnmapWindow(winItemPtr->tkwin);
+ if (canvasTkwin == Tk_Parent(winItemPtr->tkwin)) {
+ Tk_UnmapWindow(winItemPtr->tkwin);
+ } else {
+ Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
+ }
return;
}
Tk_CanvasWindowCoords(canvas, (double) winItemPtr->header.x1,