From b718b2e0880cf2b969675da98d5ef8a4a01ca5d6 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Mon, 18 May 2009 18:14:09 +0100 Subject: [PATCH] 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 --- hw/xwin/wincursor.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c index 952560844..bda057bd0 100644 --- a/hw/xwin/wincursor.c +++ b/hw/xwin/wincursor.c @@ -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);