[patch 4/8] Cygwin update for MPX device changes

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 16 21:33:38 PDT 2008


ACK - untested though.

On Thu, Oct 16, 2008 at 01:10:01PM +0100, jon.turney at dronecode.org.uk wrote:
> ---
>  xserver/hw/xwin/InitInput.c             |   16 +++++++++-------
>  xserver/hw/xwin/win.h                   |    2 ++
>  xserver/hw/xwin/winmultiwindowwndproc.c |    4 ++--
>  xserver/hw/xwin/winwndproc.c            |    4 ++--
>  4 files changed, 15 insertions(+), 11 deletions(-)
> 
> Index: xorg-git/xserver/hw/xwin/InitInput.c
> ===================================================================
> --- xorg-git.orig/xserver/hw/xwin/InitInput.c
> +++ xorg-git/xserver/hw/xwin/InitInput.c
> @@ -49,6 +49,8 @@ DISPATCH_PROC(winProcSetSelectionOwner);
>   */
>  
>  CARD32				g_c32LastInputEventTime = 0;
> +DeviceIntPtr g_pwinPointer;
> +DeviceIntPtr g_pwinKeyboard;
>  
>  
>  /*
> @@ -94,7 +96,6 @@ ProcessInputEvents (void)
>  #endif
>  
>    mieqProcessInputEvents ();
> -  miPointerUpdate ();
>  
>  #if 0
>    ErrorF ("ProcessInputEvents - returning\n");
> @@ -122,8 +123,6 @@ TimeSinceLastInputEvent ()
>  void
>  InitInput (int argc, char *argv[])
>  {
> -  DeviceIntPtr		pMouse, pKeyboard;
> -
>  #if CYGDEBUG
>    winDebug ("InitInput\n");
>  #endif
> @@ -145,11 +144,14 @@ InitInput (int argc, char *argv[])
>      }
>  #endif
>  
> -  pMouse = AddInputDevice (winMouseProc, TRUE);
> -  pKeyboard = AddInputDevice (winKeybdProc, TRUE);
> +  g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE);
> +  g_pwinKeyboard = AddInputDevice (serverClient, winKeybdProc, TRUE);
>    
> -  RegisterPointerDevice (pMouse);
> -  RegisterKeyboardDevice (pKeyboard);
> +  RegisterPointerDevice (g_pwinPointer);
> +  RegisterKeyboardDevice (g_pwinKeyboard);
> +
> +  g_pwinPointer->name = strdup("Windows mouse");
> +  g_pwinKeyboard->name = strdup("Windows keyboard");
>  
>    miRegisterPointerDevice (screenInfo.screens[0], pMouse);
>    mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse);
> Index: xorg-git/xserver/hw/xwin/win.h
> ===================================================================
> --- xorg-git.orig/xserver/hw/xwin/win.h
> +++ xorg-git/xserver/hw/xwin/win.h
> @@ -639,6 +639,8 @@ extern HINSTANCE		g_hInstance;
>  extern int                      g_copyROP[];
>  extern int                      g_patternROP[];
>  extern const char *		g_pszQueryHost;
> +extern DeviceIntPtr             g_pwinPointer;
> +extern DeviceIntPtr             g_pwinKeyboard;
>  
>  
>  /*
> Index: xorg-git/xserver/hw/xwin/winmultiwindowwndproc.c
> ===================================================================
> --- xorg-git.orig/xserver/hw/xwin/winmultiwindowwndproc.c
> +++ xorg-git/xserver/hw/xwin/winmultiwindowwndproc.c
> @@ -495,8 +495,8 @@ winTopLevelWindowProc (HWND hwnd, UINT m
>  	break;
>  
>        /* Has the mouse pointer crossed screens? */
> -      if (s_pScreen != miPointerGetScreen(inputInfo.pointer))
> -	miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen,
> +      if (s_pScreen != miPointerGetScreen(g_pwinPointer))
> +	miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen,
>  			       ptMouse.x - s_pScreenInfo->dwXOffset,
>  			       ptMouse.y - s_pScreenInfo->dwYOffset);
>  
> Index: xorg-git/xserver/hw/xwin/winwndproc.c
> ===================================================================
> --- xorg-git.orig/xserver/hw/xwin/winwndproc.c
> +++ xorg-git/xserver/hw/xwin/winwndproc.c
> @@ -724,8 +724,8 @@ winWindowProc (HWND hwnd, UINT message, 
>  	break;
>  
>        /* Has the mouse pointer crossed screens? */
> -      if (s_pScreen != miPointerGetScreen(inputInfo.pointer))
> -	miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen,
> +      if (s_pScreen != miPointerGetScreen(g_pwinPointer))
> +	miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen,
>  			       GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset,
>  			       GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset);
>  



More information about the xorg mailing list