diff --git a/src/app/stream/input/session_evmouse.c b/src/app/stream/input/session_evmouse.c index 785195d53..33bb4d0a1 100644 --- a/src/app/stream/input/session_evmouse.c +++ b/src/app/stream/input/session_evmouse.c @@ -64,14 +64,18 @@ static void mouse_listener(const evmouse_event_t *event, void *userdata) { switch (event->type) { case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: { + commons_log_info("Session", "Mouse button %d %s", event->button.button, + event->type == SDL_MOUSEBUTTONDOWN ? "down" : "up"); stream_input_handle_mbutton(&session->input, &event->button); break; } - case SDL_MOUSEMOTION: - LiSendMouseMoveEvent((short) event->motion.xrel, (short) event->motion.yrel); + case SDL_MOUSEMOTION: { + stream_input_handle_mmotion(&session->input, &event->motion); break; - case SDL_MOUSEWHEEL: + } + case SDL_MOUSEWHEEL: { stream_input_handle_mwheel(&session->input, &event->wheel); break; + } } } \ No newline at end of file diff --git a/src/app/stream/input/session_mouse.c b/src/app/stream/input/session_mouse.c index dda1493fa..cb80db306 100644 --- a/src/app/stream/input/session_mouse.c +++ b/src/app/stream/input/session_mouse.c @@ -60,7 +60,11 @@ void stream_input_handle_mwheel(stream_input_t *input, const SDL_MouseWheelEvent } void stream_input_handle_mmotion(stream_input_t *input, const SDL_MouseMotionEvent *event) { - if (input->view_only || input->no_sdl_mouse) { + if (input->view_only) { + return; + } + if (input->no_sdl_mouse) { + LiSendMouseMoveEvent((short) event->xrel, (short) event->yrel); return; } if (event->which == SDL_TOUCH_MOUSEID && LiGetHostFeatureFlags() & LI_FF_PEN_TOUCH_EVENTS) { diff --git a/third_party/commons b/third_party/commons index 316cb23fe..bb8b78ef4 160000 --- a/third_party/commons +++ b/third_party/commons @@ -1 +1 @@ -Subproject commit 316cb23fe77632f9121bfc5d75fdd1c1b79f05e5 +Subproject commit bb8b78ef4a0bceed705a9e1069a5934dfdcaa2b5