From 3d9d275d61f662deaabbb2dc9b8eafc999f59d33 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 14 Jan 2018 17:55:17 -0600 Subject: [PATCH] Ignore SDL_MOUSEBUTTONDOWN events incompatible with SPICE (#38) * Ignore SDL_MOUSEBUTTONDOWN events that aren't compatible with the SPICE PS/2 mouse --- client/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index 7707dbb8..e045a281 100644 --- a/client/main.c +++ b/client/main.c @@ -587,6 +587,9 @@ int eventThread(void * arg) } case SDL_MOUSEBUTTONDOWN: + // The SPICE protocol doesn't support more than a standard PS/2 3 button mouse + if (event.button.button > 3) + break; if ( !spice_mouse_position(event.button.x, event.button.y) || !spice_mouse_press(event.button.button) @@ -598,6 +601,9 @@ int eventThread(void * arg) break; case SDL_MOUSEBUTTONUP: + // The SPICE protocol doesn't support more than a standard PS/2 3 button mouse + if (event.button.button > 3) + break; if ( !spice_mouse_position(event.button.x, event.button.y) || !spice_mouse_release(event.button.button) @@ -1418,4 +1424,4 @@ int main(int argc, char * argv[]) return ret; -} \ No newline at end of file +}