diff --git a/client/src/main.c b/client/src/main.c index a55a6761..4d106f4a 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1154,38 +1154,44 @@ int eventFilter(void * userdata, SDL_Event * event) break; case SDL_MOUSEBUTTONDOWN: + { if (state.ignoreInput || !params.useSpiceInput || !state.cursorInView) break; - // The SPICE protocol doesn't support more than a standard PS/2 3 button mouse - if (event->button.button > 3) - break; + int button = event->button.button; + if (button > 3) + button += 2; + if ( !spice_mouse_position(event->button.x, event->button.y) || - !spice_mouse_press(event->button.button) + !spice_mouse_press(button) ) { DEBUG_ERROR("SDL_MOUSEBUTTONDOWN: failed to send message"); break; } break; + } case SDL_MOUSEBUTTONUP: + { if (state.ignoreInput || !params.useSpiceInput || !state.cursorInView) break; - // The SPICE protocol doesn't support more than a standard PS/2 3 button mouse - if (event->button.button > 3) - break; + int button = event->button.button; + if (button > 3) + button += 2; + if ( !spice_mouse_position(event->button.x, event->button.y) || - !spice_mouse_release(event->button.button) + !spice_mouse_release(button) ) { DEBUG_ERROR("SDL_MOUSEBUTTONUP: failed to send message"); break; } break; + } } // consume all events diff --git a/repos/PureSpice b/repos/PureSpice index 35ecd45b..9381dde5 160000 --- a/repos/PureSpice +++ b/repos/PureSpice @@ -1 +1 @@ -Subproject commit 35ecd45b0e441a6da2be1069a902985ae33570a1 +Subproject commit 9381dde5ecc0787594aec32d3e1aa974c8532657