mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
wayland: Remove redundant mouse button releases
Any pressed buttons are released in the loop when the pointer leaves a surface, so no need to release them again.
This commit is contained in:
parent
9fe5c1512f
commit
1fee2a9ae0
1 changed files with 0 additions and 5 deletions
|
|
@ -877,11 +877,6 @@ static void pointer_handle_leave(void *data, struct wl_pointer *pointer,
|
|||
seat->pointer.buttons_pressed &= ~SDL_BUTTON_MASK(i);
|
||||
}
|
||||
}
|
||||
SDL_SendMouseButton(0, window->sdlwindow, seat->pointer.sdl_id, SDL_BUTTON_LEFT, false);
|
||||
SDL_SendMouseButton(0, window->sdlwindow, seat->pointer.sdl_id, SDL_BUTTON_RIGHT, false);
|
||||
SDL_SendMouseButton(0, window->sdlwindow, seat->pointer.sdl_id, SDL_BUTTON_MIDDLE, false);
|
||||
SDL_SendMouseButton(0, window->sdlwindow, seat->pointer.sdl_id, SDL_BUTTON_X1, false);
|
||||
SDL_SendMouseButton(0, window->sdlwindow, seat->pointer.sdl_id, SDL_BUTTON_X2, false);
|
||||
|
||||
/* A pointer leave event may be emitted if the compositor hides the pointer in response to receiving a touch event.
|
||||
* Don't relinquish focus if the surface has active touches, as the compositor is just transitioning from mouse to touch mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue