summaryrefslogtreecommitdiff
path: root/hw/darwin
diff options
context:
space:
mode:
authorBen Byer <bbyer@bbyer.local>2007-10-31 03:22:18 -0700
committerJeremy Huddleston <jeremy@tifa.local>2007-11-21 23:11:38 -0800
commit4c18ef4331aaee268431a3ba50991f0312b82870 (patch)
tree147f528874774ea557d4749c761d119216bdc2ca /hw/darwin
parent7f2972d47a5d74fe92268c6d609b1eb6ad845824 (diff)
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)
Diffstat (limited to 'hw/darwin')
-rw-r--r--hw/darwin/darwinEvents.c3
1 files changed, 3 insertions, 0 deletions
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