summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorculler <culler>2018-11-06 13:11:09 (GMT)
committerculler <culler>2018-11-06 13:11:09 (GMT)
commitc5205ce3fbef20b6a3e78118e6ccfea8c05e0dd7 (patch)
tree94e8659ba0f3c0b4ff68010336c1b4f3f132b45f /macosx/tkMacOSXWm.c
parente29eea6eac19160aa396ad3c63147441f2215b17 (diff)
downloadtk-c5205ce3fbef20b6a3e78118e6ccfea8c05e0dd7.zip
tk-c5205ce3fbef20b6a3e78118e6ccfea8c05e0dd7.tar.gz
tk-c5205ce3fbef20b6a3e78118e6ccfea8c05e0dd7.tar.bz2
Fix bug in FrontWindowAtPoint that was causing raise.test to fail on OSX < 10.13.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c12
1 files 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;
}
/*