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
|
void
|
||||||
InitInput(int argc, char *argv[])
|
InitInput(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
xnestPointerDevice = AddInputDevice(serverClient, xnestPointerProc, TRUE);
|
int rc;
|
||||||
xnestKeyboardDevice = AddInputDevice(serverClient, xnestKeyboardProc, TRUE);
|
rc = AllocDevicePair(serverClient, "Xnest",
|
||||||
|
&xnestPointerDevice,
|
||||||
|
&xnestKeyboardDevice,
|
||||||
|
xnestPointerProc,
|
||||||
|
xnestKeyboardProc,
|
||||||
|
FALSE);
|
||||||
|
|
||||||
|
if (rc != Success)
|
||||||
|
FatalError("Failed to init Xnest default devices.\n");
|
||||||
|
|
||||||
GetEventList(&xnestEvents);
|
GetEventList(&xnestEvents);
|
||||||
|
|
||||||
RegisterPointerDevice(xnestPointerDevice);
|
|
||||||
RegisterKeyboardDevice(xnestKeyboardDevice);
|
|
||||||
|
|
||||||
mieqInit();
|
mieqInit();
|
||||||
|
|
||||||
AddEnabledDevice(XConnectionNumber(xnestDisplay));
|
AddEnabledDevice(XConnectionNumber(xnestDisplay));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user