summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorhypnotoad <yoda@etoyoc.com>2016-10-02 12:07:40 (GMT)
committerhypnotoad <yoda@etoyoc.com>2016-10-02 12:07:40 (GMT)
commit0c444bd87e7dc74b25427a5fccf08ddd8d565cd6 (patch)
tree3afc6c9d5e73e2e86de808ce98ce275312d3dc7e /win/tkWinWm.c
parent20c81b194394bb6ea16d1831f6f895b63477819c (diff)
parent6c0dafab46875ddb6dd0a91f5e056a8d87722ca6 (diff)
downloadtk-core_zip_vfs.zip
tk-core_zip_vfs.tar.gz
tk-core_zip_vfs.tar.bz2
Pulling changes from trunkcore_zip_vfs
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 017cba9..4e7618d 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -148,7 +148,7 @@ typedef struct {
*/
typedef struct WinIconInstance {
- int refCount; /* Number of instances that share this data
+ size_t refCount; /* Number of instances that share this data
* structure. */
BlockOfIconImagesPtr iconBlock;
/* Pointer to icon resource data for image */
@@ -1421,9 +1421,7 @@ static void
DecrIconRefCount(
WinIconPtr titlebaricon)
{
- titlebaricon->refCount--;
-
- if (titlebaricon->refCount <= 0) {
+ if (titlebaricon->refCount-- <= 1) {
if (titlebaricon->iconBlock != NULL) {
FreeIconBlock(titlebaricon->iconBlock);
}
@@ -3675,6 +3673,12 @@ WmForgetCmd(
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
Tk_MakeWindowExist((Tk_Window)winPtr->parentPtr);
RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window));
+
+ /*
+ * Make sure wm no longer manages this window
+ */
+ Tk_ManageGeometry(frameWin, NULL, NULL);
+
TkWmDeadWindow(winPtr);
/* flags (above) must be cleared before calling */
/* TkMapTopFrame (below) */
@@ -5730,7 +5734,7 @@ WmWaitVisibilityOrMapProc(
* This function is invoked by a widget when it wishes to set a grid
* coordinate system that controls the size of a top-level window. It
* provides a C interface equivalent to the "wm grid" command and is
- * usually asscoiated with the -setgrid option.
+ * usually associated with the -setgrid option.
*
* Results:
* None.