summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-30 11:31:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-30 11:31:28 (GMT)
commit3c99c05460738cfe089b15839984f9d09112bd86 (patch)
tree3ad7c73263b44685e961d167aa74cc35780f82ff
parent328bc894370eac1c8aa7fb1f374ddd29e192b465 (diff)
downloadtk-3c99c05460738cfe089b15839984f9d09112bd86.zip
tk-3c99c05460738cfe089b15839984f9d09112bd86.tar.gz
tk-3c99c05460738cfe089b15839984f9d09112bd86.tar.bz2
Handle Mac buttons 6-9 in one place more.
-rw-r--r--macosx/tkMacOSXMouseEvent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 0221a0e..4fc5fe4 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -185,8 +185,10 @@ enum {
typeUInt32, NULL, sizeof(UInt32), NULL, &buttons);
if (err == noErr) {
- state |= (buttons & 0x1F) * Button1Mask;
- } else if (button <= Button5) {
+ state |= (buttons & 0x7F) * Button1Mask;
+ /* Handle buttons 8/9 */
+ state |= (buttons & 0x180) * (Button8Mask >> 7);
+ } else if (button <= Button9) {
switch (eventType) {
case NSLeftMouseDown:
case NSRightMouseDown: