[client] ds: avoid util_cursorToInt when warping pointer
Using util_cursorToInt messes with the error tracking for normal movements, and is not necessary since we are computing an absolute position on the client window. Instead, we should pass doubles directly to display servers and let them decide how to best handle them. For example, XIWarpPointer accepts doubles directly.
This commit is contained in:
1 parent
71c9680245
commit
0f2fd84724
5 files changed
+10
-10
No files matched your search
+5
-5
@@ -318,13 +318,13 @@ void core_stopFrameThread(void)
|
||||
|
||||
void core_handleGuestMouseUpdate(void)
|
||||
{
|
||||
int x, y;
|
||||
struct DoublePoint localPos;
|
||||
util_guestCurToLocal(&localPos);
|
||||
localPos.x = util_clamp(localPos.x, 0.0, g_state.dstRect.w);
|
||||
localPos.y = util_clamp(localPos.y, 0.0, g_state.dstRect.h);
|
||||
util_cursorToInt(localPos.x, localPos.y, &x, &y);
|
||||
g_state.ds->guestPointerUpdated(g_cursor.guest.x, g_cursor.guest.y, x, y);
|
||||
g_state.ds->guestPointerUpdated(
|
||||
g_cursor.guest.x, g_cursor.guest.y,
|
||||
util_clamp(localPos.x, 0.0, g_state.dstRect.w),
|
||||
util_clamp(localPos.y, 0.0, g_state.dstRect.h)
|
||||
);
|
||||
}
|
||||
|
||||
void core_handleMouseGrabbed(double ex, double ey)
|
||||
|
||||
Reference in new issue
Block a user