summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSubwindows.c
diff options
context:
space:
mode:
authorculler <culler>2019-05-20 21:23:53 (GMT)
committerculler <culler>2019-05-20 21:23:53 (GMT)
commit4d732c5dd328c77dadb4a85a47e7f36cf8a4cb0b (patch)
tree2079f21e869fce9c2e317f0d2682d42e442252b8 /macosx/tkMacOSXSubwindows.c
parent5365032e991cabd52023efdf18be56c2fc3fcb13 (diff)
downloadtk-4d732c5dd328c77dadb4a85a47e7f36cf8a4cb0b.zip
tk-4d732c5dd328c77dadb4a85a47e7f36cf8a4cb0b.tar.gz
tk-4d732c5dd328c77dadb4a85a47e7f36cf8a4cb0b.tar.bz2
In Aqua, make XUnmapWindow also redraw the toplevel. Edit a comment in tkTest.c.
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r--macosx/tkMacOSXSubwindows.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index a70ab54..b660917 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -209,11 +209,12 @@ XMapWindow(
*/
TkMacOSXInvalClipRgns((Tk_Window) winPtr->parentPtr);
- if ([NSApp isDrawing]) {
- [[win contentView] setNeedsRedisplay:YES];
- } else {
- [[win contentView] setNeedsDisplay:YES];
- }
+ }
+
+ if ([NSApp isDrawing]) {
+ [[win contentView] setNeedsRedisplay:YES];
+ } else {
+ [[win contentView] setNeedsDisplay:YES];
}
/*
@@ -286,14 +287,13 @@ XUnmapWindow(
MacDrawable *macWin = (MacDrawable *) window;
TkWindow *winPtr = macWin->winPtr;
TkWindow *parentPtr = winPtr->parentPtr;
+ NSWindow *win = TkMacOSXDrawableWindow(window);
XEvent event;
display->request++;
if (Tk_IsTopLevel(winPtr)) {
if (!Tk_IsEmbedded(winPtr) &&
winPtr->wmInfoPtr->hints.initial_state!=IconicState) {
- NSWindow *win = TkMacOSXDrawableWindow(window);
-
[win orderOut:nil];
}
TkMacOSXInvalClipRgns((Tk_Window) winPtr);
@@ -314,7 +314,8 @@ XUnmapWindow(
} else {
/*
* Rebuild the visRgn clip region for the parent so it will be allowed
- * to draw in the space from which this subwindow was removed.
+ * to draw in the space from which this subwindow was removed and then
+ * redraw the window.
*/
if (parentPtr && parentPtr->privatePtr->visRgn) {
@@ -326,6 +327,11 @@ XUnmapWindow(
TkMacOSXUpdateClipRgn(parentPtr);
}
winPtr->flags &= ~TK_MAPPED;
+ if ([NSApp isDrawing]) {
+ [[win contentView] setNeedsRedisplay:YES];
+ } else {
+ [[win contentView] setNeedsDisplay:YES];
+ }
}
/*