diff --git a/client/src/app.c b/client/src/app.c index ad7c52a4..69d6e28c 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -163,22 +163,22 @@ void spiceClipboardNotice(const SpiceDataType type) void app_handleButtonPress(int button) { + g_cursor.buttons |= (1U << button); + if (!core_inputEnabled() || !g_cursor.inView) return; - g_cursor.buttons |= (1U << button); - if (!spice_mouse_press(button)) DEBUG_ERROR("app_handleButtonPress: failed to send message"); } void app_handleButtonRelease(int button) { + g_cursor.buttons &= ~(1U << button); + if (!core_inputEnabled()) return; - g_cursor.buttons &= ~(1U << button); - if (!spice_mouse_release(button)) DEBUG_ERROR("app_handleButtonRelease: failed to send message"); }