Cygwin/X: update for MPX device changes
Bring Cygwin/X up to date with MPX device API changes Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
829a8a970d
commit
bca7483c4e
|
@ -49,6 +49,8 @@ DISPATCH_PROC(winProcSetSelectionOwner);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CARD32 g_c32LastInputEventTime = 0;
|
CARD32 g_c32LastInputEventTime = 0;
|
||||||
|
DeviceIntPtr g_pwinPointer;
|
||||||
|
DeviceIntPtr g_pwinKeyboard;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -94,7 +96,6 @@ ProcessInputEvents (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mieqProcessInputEvents ();
|
mieqProcessInputEvents ();
|
||||||
miPointerUpdate ();
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
ErrorF ("ProcessInputEvents - returning\n");
|
ErrorF ("ProcessInputEvents - returning\n");
|
||||||
|
@ -122,8 +123,6 @@ TimeSinceLastInputEvent ()
|
||||||
void
|
void
|
||||||
InitInput (int argc, char *argv[])
|
InitInput (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
DeviceIntPtr pMouse, pKeyboard;
|
|
||||||
|
|
||||||
#if CYGDEBUG
|
#if CYGDEBUG
|
||||||
winDebug ("InitInput\n");
|
winDebug ("InitInput\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -145,11 +144,14 @@ InitInput (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pMouse = AddInputDevice (winMouseProc, TRUE);
|
g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE);
|
||||||
pKeyboard = AddInputDevice (winKeybdProc, TRUE);
|
g_pwinKeyboard = AddInputDevice (serverClient, winKeybdProc, TRUE);
|
||||||
|
|
||||||
RegisterPointerDevice (pMouse);
|
RegisterPointerDevice (g_pwinPointer);
|
||||||
RegisterKeyboardDevice (pKeyboard);
|
RegisterKeyboardDevice (g_pwinKeyboard);
|
||||||
|
|
||||||
|
g_pwinPointer->name = strdup("Windows mouse");
|
||||||
|
g_pwinKeyboard->name = strdup("Windows keyboard");
|
||||||
|
|
||||||
miRegisterPointerDevice (screenInfo.screens[0], pMouse);
|
miRegisterPointerDevice (screenInfo.screens[0], pMouse);
|
||||||
mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse);
|
mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse);
|
||||||
|
|
|
@ -638,6 +638,8 @@ extern HINSTANCE g_hInstance;
|
||||||
extern int g_copyROP[];
|
extern int g_copyROP[];
|
||||||
extern int g_patternROP[];
|
extern int g_patternROP[];
|
||||||
extern const char * g_pszQueryHost;
|
extern const char * g_pszQueryHost;
|
||||||
|
extern DeviceIntPtr g_pwinPointer;
|
||||||
|
extern DeviceIntPtr g_pwinKeyboard;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -495,8 +495,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Has the mouse pointer crossed screens? */
|
/* Has the mouse pointer crossed screens? */
|
||||||
if (s_pScreen != miPointerGetScreen(inputInfo.pointer))
|
if (s_pScreen != miPointerGetScreen(g_pwinPointer))
|
||||||
miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen,
|
miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen,
|
||||||
ptMouse.x - s_pScreenInfo->dwXOffset,
|
ptMouse.x - s_pScreenInfo->dwXOffset,
|
||||||
ptMouse.y - s_pScreenInfo->dwYOffset);
|
ptMouse.y - s_pScreenInfo->dwYOffset);
|
||||||
|
|
||||||
|
|
|
@ -724,8 +724,8 @@ winWindowProc (HWND hwnd, UINT message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Has the mouse pointer crossed screens? */
|
/* Has the mouse pointer crossed screens? */
|
||||||
if (s_pScreen != miPointerGetScreen(inputInfo.pointer))
|
if (s_pScreen != miPointerGetScreen(g_pwinPointer))
|
||||||
miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen,
|
miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen,
|
||||||
GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset,
|
GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset,
|
||||||
GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset);
|
GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue