Cygwin/X: Allow pointer warping to work in rootless modes

Mouse pointer warping in multiwindow/rootless mode was never implemented,
due to concerns that moving the mouse pointer without asking might be rude

This patch allows X applications to move the mouse pointer in rootless modes,
Let's hope they don't abuse this privilege ;-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon TURNEY 2009-05-18 18:14:09 +01:00
parent 85614946ba
commit b718b2e088

View File

@ -95,8 +95,16 @@ winPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
return;
}
/* Only update the Windows cursor position if we are active */
if (pScreenPriv->hwndScreen == GetForegroundWindow ())
/*
Only update the Windows cursor position if root window is active,
or we are in a rootless mode
*/
if ((pScreenPriv->hwndScreen == GetForegroundWindow ())
|| pScreenPriv->pScreenInfo->fRootless
#ifdef XWIN_MULTIWINDOW
|| pScreenPriv->pScreenInfo->fMultiWindow
#endif
)
{
/* Get the client area coordinates */
GetClientRect (pScreenPriv->hwndScreen, &rcClient);