summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2012-03-25 22:30:55 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2012-03-26 10:23:07 -0700
commit7790dc86384cc451ac44663737fde84dd81ad4e1 (patch)
tree1e21c75f27670aaff59ccd3f5a66ea002a2f087b
parent74fb534bf15687610367248071341fe4bfd1d8bf (diff)
XQuartz: Use AllocDevicePair to allocate our keyboard and mouse at the same time
Also correct isMaster to FALSE while we're here. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/xquartz/darwin.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index d826ebf21..5fbfa4d27 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -512,11 +512,13 @@ InitInput(int argc, char **argv)
.rules = "base", .model = "empty", .layout = "empty",
.variant = NULL, .options = NULL
};
+
/* We need to really have rules... or something... */
XkbSetRulesDflts(&rmlvo);
- darwinKeyboard = AddInputDevice(serverClient, DarwinKeybdProc, TRUE);
- darwinKeyboard->name = strdup("keyboard");
+ assert(Success == AllocDevicePair(serverClient, "xquartz virtual",
+ &darwinPointer, &darwinKeyboard,
+ DarwinMouseProc, DarwinKeybdProc, FALSE));
/* here's the snippet from the current gdk sources:
if (!strcmp (tmp_name, "pointer"))
@@ -532,16 +534,16 @@ InitInput(int argc, char **argv)
gdkdev->info.source = GDK_SOURCE_PEN;
*/
- darwinPointer = AddInputDevice(serverClient, DarwinMouseProc, TRUE);
- darwinPointer->name = strdup("pointer");
-
- darwinTabletStylus = AddInputDevice(serverClient, DarwinTabletProc, TRUE);
+ darwinTabletStylus = AddInputDevice(serverClient, DarwinTabletProc, FALSE);
+ assert(darwinTabletStylus);
darwinTabletStylus->name = strdup("pen");
- darwinTabletCursor = AddInputDevice(serverClient, DarwinTabletProc, TRUE);
+ darwinTabletCursor = AddInputDevice(serverClient, DarwinTabletProc, FALSE);
+ assert(darwinTabletCursor);
darwinTabletCursor->name = strdup("cursor");
- darwinTabletEraser = AddInputDevice(serverClient, DarwinTabletProc, TRUE);
+ darwinTabletEraser = AddInputDevice(serverClient, DarwinTabletProc, FALSE);
+ assert(darwinTabletEraser);
darwinTabletEraser->name = strdup("eraser");
DarwinEQInit();