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>
This commit is contained in:
parent
74fb534bf1
commit
7790dc8638
|
@ -512,11 +512,13 @@ InitInput(int argc, char **argv)
|
||||||
.rules = "base", .model = "empty", .layout = "empty",
|
.rules = "base", .model = "empty", .layout = "empty",
|
||||||
.variant = NULL, .options = NULL
|
.variant = NULL, .options = NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
/* We need to really have rules... or something... */
|
/* We need to really have rules... or something... */
|
||||||
XkbSetRulesDflts(&rmlvo);
|
XkbSetRulesDflts(&rmlvo);
|
||||||
|
|
||||||
darwinKeyboard = AddInputDevice(serverClient, DarwinKeybdProc, TRUE);
|
assert(Success == AllocDevicePair(serverClient, "xquartz virtual",
|
||||||
darwinKeyboard->name = strdup("keyboard");
|
&darwinPointer, &darwinKeyboard,
|
||||||
|
DarwinMouseProc, DarwinKeybdProc, FALSE));
|
||||||
|
|
||||||
/* here's the snippet from the current gdk sources:
|
/* here's the snippet from the current gdk sources:
|
||||||
if (!strcmp (tmp_name, "pointer"))
|
if (!strcmp (tmp_name, "pointer"))
|
||||||
|
@ -532,16 +534,16 @@ InitInput(int argc, char **argv)
|
||||||
gdkdev->info.source = GDK_SOURCE_PEN;
|
gdkdev->info.source = GDK_SOURCE_PEN;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
darwinPointer = AddInputDevice(serverClient, DarwinMouseProc, TRUE);
|
darwinTabletStylus = AddInputDevice(serverClient, DarwinTabletProc, FALSE);
|
||||||
darwinPointer->name = strdup("pointer");
|
assert(darwinTabletStylus);
|
||||||
|
|
||||||
darwinTabletStylus = AddInputDevice(serverClient, DarwinTabletProc, TRUE);
|
|
||||||
darwinTabletStylus->name = strdup("pen");
|
darwinTabletStylus->name = strdup("pen");
|
||||||
|
|
||||||
darwinTabletCursor = AddInputDevice(serverClient, DarwinTabletProc, TRUE);
|
darwinTabletCursor = AddInputDevice(serverClient, DarwinTabletProc, FALSE);
|
||||||
|
assert(darwinTabletCursor);
|
||||||
darwinTabletCursor->name = strdup("cursor");
|
darwinTabletCursor->name = strdup("cursor");
|
||||||
|
|
||||||
darwinTabletEraser = AddInputDevice(serverClient, DarwinTabletProc, TRUE);
|
darwinTabletEraser = AddInputDevice(serverClient, DarwinTabletProc, FALSE);
|
||||||
|
assert(darwinTabletEraser);
|
||||||
darwinTabletEraser->name = strdup("eraser");
|
darwinTabletEraser->name = strdup("eraser");
|
||||||
|
|
||||||
DarwinEQInit();
|
DarwinEQInit();
|
||||||
|
|
Loading…
Reference in New Issue