summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXTest.c
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-09-07 19:21:30 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-09-07 19:21:30 (GMT)
commitaa6bf77b41864232f8ca997436e72cdd6fabb32b (patch)
treeb5f33519606af41f0e39b8dde7cd718a0ead6e64 /macosx/tkMacOSXTest.c
parented825e13f3d05988eacdfaf8e978377149b9302b (diff)
parentc504b8fc55ded70a21166e2d2c8ee960c4cef962 (diff)
downloadtk-aa6bf77b41864232f8ca997436e72cdd6fabb32b.zip
tk-aa6bf77b41864232f8ca997436e72cdd6fabb32b.tar.gz
tk-aa6bf77b41864232f8ca997436e72cdd6fabb32b.tar.bz2
Merge 8.6
Diffstat (limited to 'macosx/tkMacOSXTest.c')
-rw-r--r--macosx/tkMacOSXTest.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 496d9cc..ee31995 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.
@@ -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;
}