diff options
-rw-r--r-- | macosx/tkMacOSXMouseEvent.c | 6 |
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: |