mirror of
https://github.com/brl/mutter.git
synced 2025-06-15 09:49:30 +00:00
wayland: remove pressed button checks from meta_wayland_pointer_can_grab_surface()
Leave these checks up to the callers, the only uses of this function (indirect, through meta_wayland_seat_get_grab_info) are [wl_shell|xdg]_surface.move/resize/show_window_menu. In move/resize it makes sense to check for a button being pressed, because we must expect a button release event. However for xdg_surface.show_window_menu we 1) don't strictly need further events and 2) we must account for press+release event pairs being processed at once in the compositor before the client sees the former. That is eg. the case of touchpad 2nd/3rd button tap emulation, multifinger taps will emit the event pair at once, so when the client manages to request xdg_surface.show_window_menu, it'll be too late in the compositor side, so the request is ignored. https://bugzilla.gnome.org/show_bug.cgi?id=764519
This commit is contained in:
@ -1138,8 +1138,7 @@ meta_wayland_pointer_can_grab_surface (MetaWaylandPointer *pointer,
|
||||
MetaWaylandSurface *surface,
|
||||
uint32_t serial)
|
||||
{
|
||||
return (pointer->button_count > 0 &&
|
||||
pointer->grab_serial == serial &&
|
||||
return (pointer->grab_serial == serial &&
|
||||
pointer->focus_surface == surface);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user