From 3302d353cf0ee2e2161015a42b1a8630b8e91fe7 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 9 Aug 2020 16:17:08 +1000 Subject: [PATCH] [client] always use spice mouse host mode Since we only ever use offset movements as SPICE doesn't properly support absolute x/y positional information without a virtual tablet device (which breaks relative mode needed for capture), just always run in this mode. This fixes an issue when the spice guest tools are installed and the mouse fails to work when not captured. --- VERSION | 2 +- client/src/main.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 75cd92ae..55b1f09d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B2-rc2-30-gfb9b772db0+1 \ No newline at end of file +B2-rc2-31-g1899d9f1da+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index 902cb6bd..f8c44de5 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -929,7 +929,6 @@ int eventFilter(void * userdata, SDL_Event * event) if (params.useSpiceInput) { state.serverMode = !state.serverMode; - spice_mouse_mode(state.serverMode); SDL_SetWindowGrab(state.window, state.serverMode); DEBUG_INFO("Server Mode: %s", state.serverMode ? "on" : "off"); @@ -1236,6 +1235,7 @@ static int lg_run() return -1; } + spice_mouse_mode(true); if (!lgCreateThread("spiceThread", spiceThread, NULL, &t_spice)) { DEBUG_ERROR("spice create thread failed"); @@ -1407,7 +1407,6 @@ static int lg_run() if (params.captureOnStart) { state.serverMode = true; - spice_mouse_mode(state.serverMode); SDL_SetWindowGrab(state.window, state.serverMode); DEBUG_INFO("Server Mode: %s", state.serverMode ? "on" : "off"); }