diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2012-03-25 22:30:55 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2012-03-27 11:50:47 -0700 |
commit | 67d20e393fdbcc0702a9b3e9848faaa3571d8534 (patch) | |
tree | da89cf05989e3b4ca84ac4062b360fe95cf49021 | |
parent | 3ee84899b1a3ea5d12e384046c52c7262af78395 (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>
(cherry picked from commit 7790dc86384cc451ac44663737fde84dd81ad4e1)
-rw-r--r-- | hw/xquartz/darwin.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index f6c2238b8..a1c93d9e3 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -510,11 +510,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")) @@ -530,16 +532,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(); |