diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-06-10 13:21:33 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-06-10 13:21:33 +0000 |
commit | 171e929a08098b6c844887adc43879c7579dc15f (patch) | |
tree | 6b4d2e3bc20dbd4dc9a1f031416e66614c53dd21 /xserver/hw/xwin/InitInput.c | |
parent | 68781b09de2c95b87ea898c4ecf3018dfb4460d2 (diff) |
Update to xserver 1.12.2. tested by naddy@, krw@, mpi@.
Diffstat (limited to 'xserver/hw/xwin/InitInput.c')
-rw-r--r-- | xserver/hw/xwin/InitInput.c | 98 |
1 files changed, 42 insertions, 56 deletions
diff --git a/xserver/hw/xwin/InitInput.c b/xserver/hw/xwin/InitInput.c index bc48a9360..395b533fc 100644 --- a/xserver/hw/xwin/InitInput.c +++ b/xserver/hw/xwin/InitInput.c @@ -33,18 +33,16 @@ #include "dixstruct.h" #include "inputstr.h" - /* * Local function prototypes */ #ifdef XWIN_CLIPBOARD -int winProcEstablishConnection(ClientPtr /* client */); -int winProcQueryTree(ClientPtr /* client */); -int winProcSetSelectionOwner(ClientPtr /* client */); +int winProcEstablishConnection(ClientPtr /* client */ ); +int winProcQueryTree(ClientPtr /* client */ ); +int winProcSetSelectionOwner(ClientPtr /* client */ ); #endif - /* * Local global declarations */ @@ -62,99 +60,87 @@ DeviceIntPtr g_pwinKeyboard; */ Bool -LegalModifier (unsigned int uiKey, DeviceIntPtr pDevice) +LegalModifier(unsigned int uiKey, DeviceIntPtr pDevice) { - return TRUE; + return TRUE; } - /* Called from dix/dispatch.c */ /* * Run through the Windows message queue(s) one more time. * Tell mi to dequeue the events that we have sent it. */ void -ProcessInputEvents (void) +ProcessInputEvents(void) { #if 0 - ErrorF ("ProcessInputEvents\n"); + ErrorF("ProcessInputEvents\n"); #endif - mieqProcessInputEvents (); + mieqProcessInputEvents(); #if 0 - ErrorF ("ProcessInputEvents - returning\n"); + ErrorF("ProcessInputEvents - returning\n"); #endif } - -void DDXRingBell(int volume, int pitch, int duration) +void +DDXRingBell(int volume, int pitch, int duration) { - /* winKeybdBell is used instead */ - return; + /* winKeybdBell is used instead */ + return; } - /* See Porting Layer Definition - p. 17 */ void -InitInput (int argc, char *argv[]) +InitInput(int argc, char *argv[]) { #if CYGDEBUG - winDebug ("InitInput\n"); + winDebug("InitInput\n"); #endif #ifdef XWIN_CLIPBOARD - /* - * Wrap some functions at every generation of the server. - */ - if (InitialVector[2] != winProcEstablishConnection) - { - winProcEstablishConnectionOrig = InitialVector[2]; - InitialVector[2] = winProcEstablishConnection; - } - if (g_fXdmcpEnabled - && ProcVector[X_QueryTree] != winProcQueryTree) - { - winProcQueryTreeOrig = ProcVector[X_QueryTree]; - ProcVector[X_QueryTree] = winProcQueryTree; + /* + * Wrap some functions at every generation of the server. + */ + if (InitialVector[2] != winProcEstablishConnection) { + winProcEstablishConnectionOrig = InitialVector[2]; + InitialVector[2] = winProcEstablishConnection; } #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"); + g_pwinPointer = AddInputDevice(serverClient, winMouseProc, TRUE); + g_pwinKeyboard = AddInputDevice(serverClient, winKeybdProc, TRUE); + g_pwinPointer->name = strdup("Windows mouse"); + g_pwinKeyboard->name = strdup("Windows keyboard"); - mieqInit (); + mieqInit(); - /* Initialize the mode key states */ - winInitializeModeKeyStates (); + /* Initialize the mode key states */ + winInitializeModeKeyStates(); #ifdef HAS_DEVWINDOWS - /* Only open the windows message queue device once */ - if (g_fdMessageQueue == WIN_FD_INVALID) - { - /* Open a file descriptor for the Windows message queue */ - g_fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, O_RDONLY); - - if (g_fdMessageQueue == -1) - { - FatalError ("InitInput - Failed opening %s\n", - WIN_MSG_QUEUE_FNAME); - } - - /* Add the message queue as a device to wait for in WaitForSomething */ - AddEnabledDevice (g_fdMessageQueue); + /* Only open the windows message queue device once */ + if (g_fdMessageQueue == WIN_FD_INVALID) { + /* Open a file descriptor for the Windows message queue */ + g_fdMessageQueue = open(WIN_MSG_QUEUE_FNAME, O_RDONLY); + + if (g_fdMessageQueue == -1) { + FatalError("InitInput - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); + } + + /* Add the message queue as a device to wait for in WaitForSomething */ + AddEnabledDevice(g_fdMessageQueue); } #endif #if CYGDEBUG - winDebug ("InitInput - returning\n"); + winDebug("InitInput - returning\n"); #endif } void -CloseInput (void) +CloseInput(void) { - mieqFini (); + mieqFini(); } |