summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorculler <culler>2024-06-22 19:13:38 (GMT)
committerculler <culler>2024-06-22 19:13:38 (GMT)
commitd5e7bdcdc2200b4a3a52846c1ab19dd0232dc7a3 (patch)
treef2e510881de2bc2b02838f5aca9ca3965efbf6e9 /macosx/tkMacOSXWm.c
parentfc4199e50686faf5dd37455e4a9313b137707f82 (diff)
downloadtk-d5e7bdcdc2200b4a3a52846c1ab19dd0232dc7a3.zip
tk-d5e7bdcdc2200b4a3a52846c1ab19dd0232dc7a3.tar.gz
tk-d5e7bdcdc2200b4a3a52846c1ab19dd0232dc7a3.tar.bz2
Try to ensure that clipping regions are ready before filling a frame; clean up unixWm.test
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index dfa5701..48e8d1a 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -819,28 +819,26 @@ FrontWindowAtPoint(
int y)
{
NSPoint p = NSMakePoint(x, TkMacOSXZeroScreenHeight() - y);
- NSArray *windows = [NSApp orderedWindows];
- TkWindow *winPtr = NULL;
- for (NSWindow *w in windows) {
- winPtr = TkMacOSXGetTkWindow(w);
+ for (NSWindow *w in [NSApp orderedWindows]) {
+ TkWindow *winPtr = TkMacOSXGetTkWindow(w);
if (winPtr) {
NSRect windowFrame = [w frame];
- NSRect contentFrame = [w frame];
+ NSRect contentFrame = windowFrame;
- contentFrame.size.height = [[w contentView] frame].size.height;
/*
* For consistency with other platforms, points in the
* title bar are not considered to be contained in the
* window.
*/
+ contentFrame.size.height = [[w contentView] frame].size.height;
if (NSMouseInRect(p, contentFrame, NO)) {
return winPtr;
} else if (NSMouseInRect(p, windowFrame, NO)) {
/*
* The pointer is in the title bar of the highest NSWindow
- * containing it, and therefore is should not be considered
+ * containing it, and therefore it should not be considered
* to be contained in any Tk window.
*/
return NULL;