[client] mouse: process mouse up event even if not in view

Unless the corresponding mouse down event was on our surface, we should
not be receiving the mouse up.

This is always the case on Wayland. On some other platforms,
SDL_CaptureMouse can be used to obtain input that happens outside the
Looking Glass surface, but Looking Glass does not make use of that
function.

We may want to process a mouse up if the corresponding mouse down
initiated a drag (e.g., of a window) that was released slightly outside
of the Looking Glass surface. Previously, Looking Glass would ignore the
mouse up, and the guest would be confused into thinking the button had
never been released, not ending the drag.
This commit is contained in:
Tudor Brindus 2021-01-16 16:01:58 -05:00 committed by Geoffrey McRae
parent c69b86ab6e
commit f86800cc3a

View File

@ -1464,7 +1464,7 @@ int eventFilter(void * userdata, SDL_Event * event)
case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONUP:
{ {
if (!app_inputEnabled() || !g_cursor.inView) if (!app_inputEnabled())
break; break;
int button = event->button.button; int button = event->button.button;