From 9e0213152578c20f7053eb1c0f6b308d312de9a0 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 29 May 2018 11:55:28 +1000 Subject: [PATCH] [client] don't scale the mouse when in capture mode --- client/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/main.c b/client/main.c index 0d7c3d70..e1e46321 100644 --- a/client/main.c +++ b/client/main.c @@ -475,7 +475,7 @@ int eventFilter(void * userdata, SDL_Event * event) { x = event->motion.x - state.dstRect.x; y = event->motion.y - state.dstRect.y; - if (params.scaleMouseInput) + if (params.scaleMouseInput && !serverMode) { x = (float)x * state.scaleX; y = (float)y * state.scaleY; @@ -495,7 +495,7 @@ int eventFilter(void * userdata, SDL_Event * event) y = event->motion.yrel; if (x != 0 || y != 0) { - if (params.scaleMouseInput) + if (params.scaleMouseInput && !serverMode) { state.accX += (float)x * state.scaleX; state.accY += (float)y * state.scaleY; @@ -504,6 +504,7 @@ int eventFilter(void * userdata, SDL_Event * event) state.accX -= x; state.accY -= y; } + if (!spice_mouse_motion(x, y)) { DEBUG_ERROR("SDL_MOUSEMOTION: failed to send message");