From 8680f93ff96770b0a022596d8d4092a29c586435 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 26 Jul 2011 08:41:31 +0200 Subject: Use AllocDevicePair for create the mouse and keyboard devices --- xorg-server/hw/xwin/InitInput.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'xorg-server/hw') diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c index 6e7db760d..3e02633a5 100644 --- a/xorg-server/hw/xwin/InitInput.c +++ b/xorg-server/hw/xwin/InitInput.c @@ -90,6 +90,7 @@ void DDXRingBell(int volume, int pitch, int duration) void InitInput (int argc, char *argv[]) { + int rc; winDebug ("InitInput\n"); #ifdef XWIN_CLIPBOARD @@ -103,10 +104,15 @@ InitInput (int argc, char *argv[]) } #endif - g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE); - g_pwinKeyboard = AddInputDevice (serverClient, winKeybdProc, TRUE); - g_pwinPointer->name = strdup("Windows mouse"); - g_pwinKeyboard->name = strdup("Windows keyboard"); + rc = AllocDevicePair(serverClient, "Windows", + &g_pwinPointer, + &g_pwinKeyboard, + winMouseProc, + winKeybdProc, + FALSE); + + if (rc != Success) + FatalError("Failed to init vcxsrv default devices.\n"); mieqInit (); -- cgit v1.2.3