From 3c99c05460738cfe089b15839984f9d09112bd86 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 30 Jul 2019 11:31:28 +0000 Subject: Handle Mac buttons 6-9 in one place more. --- macosx/tkMacOSXMouseEvent.c | 6 ++++-- 1 file 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: -- cgit v0.12