diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-05-18 18:14:09 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-06-29 17:54:38 +0100 |
commit | b718b2e0880cf2b969675da98d5ef8a4a01ca5d6 (patch) | |
tree | 7c671564a19184fa49460acabecf17a46f07c87b /hw | |
parent | 85614946ba3d5a233eece612afc7f09572a347c2 (diff) |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwin/wincursor.c | 12 |
1 files 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); |