From c5205ce3fbef20b6a3e78118e6ccfea8c05e0dd7 Mon Sep 17 00:00:00 2001 From: culler Date: Tue, 6 Nov 2018 13:11:09 +0000 Subject: Fix bug in FrontWindowAtPoint that was causing raise.test to fail on OSX < 10.13. --- macosx/tkMacOSXWm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 211c3a8..ed930fe 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -605,15 +605,15 @@ FrontWindowAtPoint( { NSPoint p = NSMakePoint(x, tkMacOSXZeroScreenHeight - y); NSArray *windows = [NSApp orderedWindows]; - TkWindow *front = NULL; + TkWindow *winPtr = NULL; for (NSWindow *w in windows) { - if (w && NSMouseInRect(p, [w frame], NO)) { - front = TkMacOSXGetTkWindow(w); - break; - } + winPtr = TkMacOSXGetTkWindow(w); + if (winPtr && NSMouseInRect(p, [w frame], NO)) { + break; } - return front; + } + return winPtr; } /* -- cgit v0.12