xnest: use AllocDevicePair for Xnest device initalization
All Xnest needs is a single pointer+keyboard pair. AllocDevicePair sets them up nicely with the name assigned etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
26b83ad4a2
commit
32ce5c83a5
|
@ -89,14 +89,19 @@ InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
|
|||
void
|
||||
InitInput(int argc, char *argv[])
|
||||
{
|
||||
xnestPointerDevice = AddInputDevice(serverClient, xnestPointerProc, TRUE);
|
||||
xnestKeyboardDevice = AddInputDevice(serverClient, xnestKeyboardProc, TRUE);
|
||||
int rc;
|
||||
rc = AllocDevicePair(serverClient, "Xnest",
|
||||
&xnestPointerDevice,
|
||||
&xnestKeyboardDevice,
|
||||
xnestPointerProc,
|
||||
xnestKeyboardProc,
|
||||
FALSE);
|
||||
|
||||
if (rc != Success)
|
||||
FatalError("Failed to init Xnest default devices.\n");
|
||||
|
||||
GetEventList(&xnestEvents);
|
||||
|
||||
RegisterPointerDevice(xnestPointerDevice);
|
||||
RegisterKeyboardDevice(xnestKeyboardDevice);
|
||||
|
||||
mieqInit();
|
||||
|
||||
AddEnabledDevice(XConnectionNumber(xnestDisplay));
|
||||
|
|
Loading…
Reference in New Issue
Block a user