From 478c22d47c125e789a22ef8cf05c3117288a0cdd Mon Sep 17 00:00:00 2001 From: culler Date: Tue, 25 Jun 2024 14:14:04 +0000 Subject: Work on unixWm-50.9 and -51.7. --- macosx/tkMacOSXWm.c | 17 ++++++++++++++++- tests/unixWm.test | 3 ++- 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 } -- cgit v0.12