summaryrefslogtreecommitdiff
path: root/emu
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2011-01-04 10:15:00 +0000
committerforsyth <forsyth@vitanuova.com>2011-01-04 10:15:00 +0000
commit073037acb44c04c72d010aa47fbde54dc9726e8f (patch)
treea4fdfd55a810f5165123560388a6605eb9066fb7 /emu
parent52f16d1848f6b09be704656b278eb3dba30416bd (diff)
20110104-1013
Diffstat (limited to 'emu')
-rw-r--r--emu/MacOSX/win.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/emu/MacOSX/win.c b/emu/MacOSX/win.c
index 137ab275..a49b4bc7 100644
--- a/emu/MacOSX/win.c
+++ b/emu/MacOSX/win.c
@@ -450,10 +450,15 @@ MainWindowEventHandler(EventHandlerCallRef nextHandler, EventRef event, void *us
{
uint32_t buttons;
uint32_t modifiers;
+ uint32_t clkcnt;
+
GetEventParameter(event, kEventParamKeyModifiers, typeUInt32,
0, sizeof(modifiers), 0, &modifiers);
GetEventParameter(event, kEventParamMouseChord, typeUInt32,
0, sizeof buttons, 0, &buttons);
+ GetEventParameter(event, kEventParamClickCount, typeUInt32,
+ 0, sizeof(clkcnt), 0, &clkcnt);
+
/* simulate other buttons via alt/apple key. like x11 */
if(modifiers & optionKey) {
mousebuttons = ((buttons & 1) ? 2 : 0);
@@ -465,6 +470,8 @@ MainWindowEventHandler(EventHandlerCallRef nextHandler, EventRef event, void *us
mousebuttons |= ((buttons & 2)<<1);
mousebuttons |= ((buttons & 4)>>1);
+ if(clkcnt > 1)
+ mousebuttons |= 1<<8;
} /* Fallthrough */
case kEventMouseMoved: