diff options
Diffstat (limited to 'xorg-server/hw/xwin/InitInput.c')
-rw-r--r-- | xorg-server/hw/xwin/InitInput.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c index 9cf573536..3e02633a5 100644 --- a/xorg-server/hw/xwin/InitInput.c +++ b/xorg-server/hw/xwin/InitInput.c @@ -32,7 +32,7 @@ #include "win.h" #include "dixstruct.h" #include "inputstr.h" - +#include <unistd.h> /* * Local function prototypes @@ -40,7 +40,6 @@ #ifdef XWIN_CLIPBOARD int winProcEstablishConnection(ClientPtr /* client */); -int winProcQueryTree(ClientPtr /* client */); int winProcSetSelectionOwner(ClientPtr /* client */); #endif @@ -76,15 +75,7 @@ LegalModifier (unsigned int uiKey, DeviceIntPtr pDevice) void ProcessInputEvents (void) { -#if 0 - ErrorF ("ProcessInputEvents\n"); -#endif - mieqProcessInputEvents (); - -#if 0 - ErrorF ("ProcessInputEvents - returning\n"); -#endif } @@ -99,9 +90,8 @@ void DDXRingBell(int volume, int pitch, int duration) void InitInput (int argc, char *argv[]) { -#if CYGDEBUG + int rc; winDebug ("InitInput\n"); -#endif #ifdef XWIN_CLIPBOARD /* @@ -114,15 +104,20 @@ 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 (); - /* Initialize the mode key states */ - winInitializeModeKeyStates (); + /* Do not nitialize the mode key states here yet since the keyboard device is not started yet + winInitializeModeKeyStates (); */ #ifdef HAS_DEVWINDOWS /* Only open the windows message queue device once */ @@ -142,13 +137,13 @@ InitInput (int argc, char *argv[]) } #endif -#if CYGDEBUG winDebug ("InitInput - returning\n"); -#endif } void CloseInput (void) { mieqFini (); + g_pwinPointer=NULL; + g_pwinKeyboard=NULL; } |