summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorculler <culler>2024-06-25 14:14:04 (GMT)
committerculler <culler>2024-06-25 14:14:04 (GMT)
commit478c22d47c125e789a22ef8cf05c3117288a0cdd (patch)
tree982fb1b90a0cb1abc1d97542479a43a829430b77
parentf8087a27cf185e1321edaf4f8a612a71b99a84e2 (diff)
downloadtk-478c22d47c125e789a22ef8cf05c3117288a0cdd.zip
tk-478c22d47c125e789a22ef8cf05c3117288a0cdd.tar.gz
tk-478c22d47c125e789a22ef8cf05c3117288a0cdd.tar.bz2
Work on unixWm-50.9 and -51.7.
-rw-r--r--macosx/tkMacOSXWm.c17
-rw-r--r--tests/unixWm.test3
2 files changed, 18 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 115060d..04a3ce5 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5665,6 +5665,15 @@ Tk_MoveToplevelWindow(
*
*----------------------------------------------------------------------
*/
+#define PRINT_STACK \
+ for (NSWindow *w in [NSApp orderedWindows]) { \
+ TkWindow *winPtr2 = TkMacOSXGetTkWindow(w); \
+ if (winPtr2) { \
+ fprintf(stderr, "%s ", Tk_PathName(winPtr2)); \
+ } \
+ } \
+ fprintf(stderr, "\n"); \
+ fflush(stderr)
void
TkWmRestackToplevel(
@@ -5722,8 +5731,14 @@ TkWmRestackToplevel(
* Just let the Mac window manager deal with all the subtleties of keeping
* track of off-screen windows, etc.
*/
-
+#if 0
+ fprintf(stderr, "window order: "); PRINT_STACK;
+#endif
[macWindow orderWindow:macAboveBelow relativeTo:otherNumber];
+#if 0
+ fprintf(stderr, "new window order: "); PRINT_STACK;
+#endif
+#undef PRINT_STACK
}
/*
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 5e6dd76..e3b5029 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -1974,9 +1974,9 @@ test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {unix failsOnUb
update
toplevel .t2 -width 200 -height 200 -bg red
tkwait visibility .t2
- update
wm geometry .t2 +20+20
update
+ after 300;# needed for macOS
set result [list [winfo containing 120 120]]
destroy .t2
update
@@ -2069,6 +2069,7 @@ test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} {uni
update
toplevel $w -width 200 -height 200 -bg green
tkwait visibility $w
+ after 300;# needed for macOS
wm geometry $w +100+100
update
}