diff options
author | marc_culler <marc.culler@gmail.com> | 2020-09-07 16:08:38 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2020-09-07 16:08:38 (GMT) |
commit | 5c986033d8fb50cfcdeb184c2884afa5fa352f42 (patch) | |
tree | ecbc71f44b14b3efd3038f42441533e25934b04a | |
parent | bc231dc106f1dbdad5eb6bf83f1a2ef179fb72ff (diff) | |
download | tk-5c986033d8fb50cfcdeb184c2884afa5fa352f42.zip tk-5c986033d8fb50cfcdeb184c2884afa5fa352f42.tar.gz tk-5c986033d8fb50cfcdeb184c2884afa5fa352f42.tar.bz2 |
Edit a comment.
-rw-r--r-- | macosx/tkMacOSXTest.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c index cefcfad..9faeff8 100644 --- a/macosx/tkMacOSXTest.c +++ b/macosx/tkMacOSXTest.c @@ -175,9 +175,11 @@ TkTestLogDisplay( * PressButtonObjCmd -- * * This Tcl command simulates a button press at a specific screen - * location. It injects NSEvents into the NSApplication event queue, - * as opposed to adding events to the Tcl queue as event generate - * would do. One application is for testing the grab command. + * location. It injects NSEvents into the NSApplication event queue, as + * opposed to adding events to the Tcl queue as event generate would do. + * One application is for testing the grab command. These events have + * pressure = -1.0 as a signal indicating that they should not be ignored + * by [NSApp tkProcessMouseEvent]. * * Results: * A standard Tcl result. @@ -229,7 +231,7 @@ PressButtonObjCmd( pt.x = loc.x = x; pt.y = y; loc.y = ScreenHeight - y; - wNum = -1; + wNum = 0; CGWarpMouseCursorPosition(pt); motion = [NSEvent mouseEventWithType:NSMouseMoved location:loc @@ -239,7 +241,7 @@ PressButtonObjCmd( context:nil eventNumber:0 clickCount:1 - pressure:0.0]; + pressure:-1.0]; [NSApp postEvent:motion atStart:NO]; press = [NSEvent mouseEventWithType:NSLeftMouseDown location:loc @@ -249,7 +251,7 @@ PressButtonObjCmd( context:nil eventNumber:1 clickCount:1 - pressure:0.0]; + pressure:-1.0]; [NSApp postEvent:press atStart:NO]; release = [NSEvent mouseEventWithType:NSLeftMouseUp location:loc @@ -259,7 +261,7 @@ PressButtonObjCmd( context:nil eventNumber:2 clickCount:1 - pressure:0.0]; + pressure:-1.0]; [NSApp postEvent:release atStart:NO]; return TCL_OK; } |