Added support for a global relative mouse motion option. When true

and on a secondary screen and locked to the screen (via scroll lock)
mouse motion is sent as motion deltas.  When true and scroll lock
is toggled off the mouse is warped to the secondary screen's center
so the server knows where it is.  This option is intended to support
games and other programs that repeatedly warp the mouse to the center
of the screen.  This change adds general and X11 support but not
win32.  The option name is "relativeMouseMoves".
This commit is contained in:
crs
2004-05-01 15:18:59 +00:00
parent 320cc754a2
commit 16110acaa2
22 changed files with 138 additions and 12 deletions

View File

@@ -550,6 +550,19 @@ CXWindowsScreen::fakeMouseMove(SInt32 x, SInt32 y) const
XFlush(m_display);
}
void
CXWindowsScreen::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
{
// FIXME -- ignore xinerama for now
if (false && m_xinerama && m_xtestIsXineramaUnaware) {
// XWarpPointer(m_display, None, m_root, 0, 0, 0, 0, x, y);
}
else {
XTestFakeRelativeMotionEvent(m_display, dx, dy, CurrentTime);
}
XFlush(m_display);
}
void
CXWindowsScreen::fakeMouseWheel(SInt32 delta) const
{