summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMouseEvent.c
diff options
context:
space:
mode:
authorculler <culler>2019-10-11 20:14:40 (GMT)
committerculler <culler>2019-10-11 20:14:40 (GMT)
commit09bb06b273610a411d611b606b08cb6b6b30eec7 (patch)
treec343ed5a57457d05a7017d6147c9933dd012b21b /macosx/tkMacOSXMouseEvent.c
parent624d527a6a5bb7228d19aa80b8307151c47c2692 (diff)
downloadtk-09bb06b273610a411d611b606b08cb6b6b30eec7.zip
tk-09bb06b273610a411d611b606b08cb6b6b30eec7.tar.gz
tk-09bb06b273610a411d611b606b08cb6b6b30eec7.tar.bz2
Use vwait instead of after in canvImg.test. On macOS protect against exceptions
when periodic events are scheduled.
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r--macosx/tkMacOSXMouseEvent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 074e36e..bc7c616 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -58,6 +58,7 @@ enum {
NSTrackingArea *trackingArea = nil;
NSInteger eventNumber, clickCount, buttonNumber;
#endif
+ [NSEvent stopPeriodicEvents];
#ifdef TK_MAC_DEBUG_EVENTS
TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, theEvent);
@@ -656,6 +657,7 @@ TkpSetCapture(
while (winPtr && !Tk_IsTopLevel(winPtr)) {
winPtr = winPtr->parentPtr;
}
+ [NSEvent stopPeriodicEvents];
captureWinPtr = (Tk_Window) winPtr;
}