From 4c18ef4331aaee268431a3ba50991f0312b82870 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 31 Oct 2007 03:22:18 -0700 Subject: [PATCH] Darwin: Workaround for a bug where the holding down Command to make a "fake" button 2 click would actually result in a Command-2 chord. (I.e. it wasn't releasing Command before clicking the fake button.) (cherry picked from commit 0d5dd5dffa4c5ce3f54dfe53720a39d524dc8e37) --- hw/darwin/darwinEvents.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 3d7f268ca..bc3a041a5 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -166,6 +166,9 @@ static void DarwinSimulateMouseClick( int modifierMask) // modifiers used for the fake click { // first fool X into forgetting about the keys + // for some reason, it's not enough to tell X we released the Command key -- + // it has to be the *left* Command key. + if (modifierMask & NX_COMMANDMASK) modifierMask |=NX_DEVICELCMDKEYMASK ; DarwinUpdateModifiers(KeyRelease, modifierMask); // push the mouse button