wayland: Drop redundant MetaDisplay grab op

This is no longer necessary to prevent the bits we wanted to be
prevented by the presence of this grab. We can drop this, and
let it work through the MetaWaylandPointerGrab interface.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho 2022-09-29 15:21:48 +02:00 committed by Marge Bot
parent 1198fe700a
commit a8cd488c6f

View File

@ -187,31 +187,13 @@ meta_wayland_popup_grab_begin (MetaWaylandPopupGrab *grab,
MetaWaylandSurface *surface) MetaWaylandSurface *surface)
{ {
MetaWaylandPointer *pointer = grab->generic.pointer; MetaWaylandPointer *pointer = grab->generic.pointer;
MetaWindow *window = meta_wayland_surface_get_window (surface);
meta_wayland_pointer_start_grab (pointer, (MetaWaylandPointerGrab*)grab); meta_wayland_pointer_start_grab (pointer, (MetaWaylandPointerGrab*)grab);
meta_display_begin_grab_op (window->display,
window,
META_GRAB_OP_WAYLAND_POPUP,
FALSE, /* pointer_already_grabbed */
FALSE, /* frame_action */
1, /* button. XXX? */
0, /* modmask */
meta_display_get_current_time_roundtrip (
window->display),
pointer->grab_x,
pointer->grab_y);
} }
void void
meta_wayland_popup_grab_end (MetaWaylandPopupGrab *grab) meta_wayland_popup_grab_end (MetaWaylandPopupGrab *grab)
{ {
MetaWaylandInputDevice *input_device =
META_WAYLAND_INPUT_DEVICE (grab->generic.pointer);
MetaWaylandSeat *seat = meta_wayland_input_device_get_seat (input_device);
MetaWaylandCompositor *compositor = meta_wayland_seat_get_compositor (seat);
MetaContext *context = meta_wayland_compositor_get_context (compositor);
MetaDisplay *display = meta_context_get_display (context);
MetaWaylandPopup *popup, *tmp; MetaWaylandPopup *popup, *tmp;
g_assert (grab->generic.interface == &popup_grab_interface); g_assert (grab->generic.interface == &popup_grab_interface);
@ -222,9 +204,6 @@ meta_wayland_popup_grab_end (MetaWaylandPopupGrab *grab)
meta_wayland_popup_destroy (popup); meta_wayland_popup_destroy (popup);
} }
meta_display_end_grab_op (display,
meta_display_get_current_time_roundtrip (display));
meta_wayland_pointer_end_grab (grab->generic.pointer); meta_wayland_pointer_end_grab (grab->generic.pointer);
} }