[client] wm: added new platform agnostic wmWarpMouse

This commit is contained in:
Geoffrey McRae committed 2021-01-10 15:47:03 +11:00
1 parent 8466e57468
commit fc0d82d490
3 files changed
+22 -12

No files matched your search

+1 -12
View File
@@ -846,18 +846,7 @@ static void warpMouse(int x, int y, bool disable)
if (g_cursor.pos.x == x && g_cursor.pos.y == y)
return;
if (g_state.wminfo.subsystem == SDL_SYSWM_X11)
{
XWarpPointer(
g_state.wminfo.info.x11.display,
None,
g_state.wminfo.info.x11.window,
0, 0, 0, 0,
x, y);
XSync(g_state.wminfo.info.x11.display, False);
}
else
SDL_WarpMouseInWindow(g_state.window, x, y);
wmWarpMouse(x, y);
}
static bool isValidCursorLocation(int x, int y)