summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-03 18:00:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-03 18:00:10 (GMT)
commitcd026d544367512db80eed7ea948c68b2e0ff623 (patch)
treee83a4b7be6aa05516cf3c34cf25bf78fa4f2669e /macosx
parent7311d9315f8484ce3cc251cb652f3ec19eaedecb (diff)
parent5141d1a7d374a8bf342737ca4777891b499c0c64 (diff)
downloadtk-cd026d544367512db80eed7ea948c68b2e0ff623.zip
tk-cd026d544367512db80eed7ea948c68b2e0ff623.tar.gz
tk-cd026d544367512db80eed7ea948c68b2e0ff623.tar.bz2
Merge 8.6
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXSubwindows.c2
-rw-r--r--macosx/tkMacOSXWm.c24
2 files changed, 14 insertions, 12 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index ed44ef5..a420898 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -128,7 +128,7 @@ XDestroyWindow(
* Tk_WmMapWindow.
*
* Results:
- * Returns Success or BadWindow.
+ * Always returns Success or BadWindow.
*
* Side effects:
* The subwindow or toplevel may appear on the screen. VisibilityNotify
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 547657b..906973a 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -1077,18 +1077,20 @@ TkWmUnmapWindow(
TkWindow *winPtr) /* Top-level window that's about to be
* unmapped. */
{
- XEvent event;
-
- event.xany.serial = LastKnownRequestProcessed(winPtr->display);
- event.xany.send_event = False;
- event.xany.display = winPtr->display;
- event.xunmap.type = UnmapNotify;
- event.xunmap.window = winPtr->window;
- event.xunmap.event = winPtr->window;
- event.xunmap.from_configure = false;
winPtr->flags &= ~TK_MAPPED;
- XUnmapWindow(winPtr->display, winPtr->window);
- Tk_HandleEvent(&event);
+ if ((winPtr->window != None)
+ && (XUnmapWindow(winPtr->display, winPtr->window) == Success)) {
+ XEvent event;
+
+ event.xany.serial = LastKnownRequestProcessed(winPtr->display);
+ event.xany.send_event = False;
+ event.xany.display = winPtr->display;
+ event.xunmap.type = UnmapNotify;
+ event.xunmap.window = winPtr->window;
+ event.xunmap.event = winPtr->window;
+ event.xunmap.from_configure = false;
+ Tk_HandleEvent(&event);
+ }
}
/*