summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvWind.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-11-17 22:44:27 (GMT)
committerhobbs <hobbs>2004-11-17 22:44:27 (GMT)
commit9e759bc25ada4a13dafd43ccd3ecd7294cbe8ab9 (patch)
tree24336ab9634e01160aa5ce2ed2c1df35029704ae /generic/tkCanvWind.c
parent27f113bb1916abd636bed765ae6917127fa0a11b (diff)
downloadtk-9e759bc25ada4a13dafd43ccd3ecd7294cbe8ab9.zip
tk-9e759bc25ada4a13dafd43ccd3ecd7294cbe8ab9.tar.gz
tk-9e759bc25ada4a13dafd43ccd3ecd7294cbe8ab9.tar.bz2
* generic/tkCanvWind.c (ConfigureWinItem): unmap windows
immediately when state hidden is requested. [Bug 982248]
Diffstat (limited to 'generic/tkCanvWind.c')
-rw-r--r--generic/tkCanvWind.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index a820163..7b8c844 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.9 2003/02/09 07:48:22 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvWind.c,v 1.9.2.1 2004/11/17 22:44:37 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,