summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMouseEvent.c
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2021-12-03 15:59:10 (GMT)
committermarc_culler <marc.culler@gmail.com>2021-12-03 15:59:10 (GMT)
commita2508774e06160de49c4a3f65858d50e254e8458 (patch)
tree27ff19f60952750f4edf130d33e226ccadeeb29b /macosx/tkMacOSXMouseEvent.c
parent7d4f6a41de857b9b7fed9256e640abae9352b99e (diff)
downloadtk-a2508774e06160de49c4a3f65858d50e254e8458.zip
tk-a2508774e06160de49c4a3f65858d50e254e8458.tar.gz
tk-a2508774e06160de49c4a3f65858d50e254e8458.tar.bz2
Fix bad B1-Motion coordinates in a certain strange situation.
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r--macosx/tkMacOSXMouseEvent.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 19e6821..96439fa 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -161,6 +161,7 @@ enum {
break;
case NSLeftMouseUp:
isDragging = NO;
+ dragTarget = NULL;
if (ignoreDrags) {
ignoreDrags = NO;
return theEvent;
@@ -256,11 +257,12 @@ enum {
}
if (newFocus) {
[NSApp setTkEventTarget: newFocus];
+ [NSApp setTkPointerWindow: newFocus];
}
if (isDragging) {
- if (!NSPointInRect(location, [[w contentView] bounds]))
- dragTarget = (Tk_Window) newFocus;
- return theEvent;
+ if (!NSPointInRect(location, [[w contentView] bounds])) {
+ return theEvent;
+ }
}
}
winPtr = [NSApp tkEventTarget];