Skip to content

Commit

Permalink
core: Drop META_GRAB_OP_COMPOSITOR
Browse files Browse the repository at this point in the history
There is no longer meta_plugin_begin_modal(), so this grab operation
is no longer used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2100>
  • Loading branch information
garnacho committed Jan 29, 2022
1 parent b6de66e commit e8ed9ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
8 changes: 1 addition & 7 deletions src/core/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1817,10 +1817,6 @@ get_event_route_from_grab_op (MetaGrabOp op)
case META_GRAB_OP_WINDOW_BASE:
return META_EVENT_ROUTE_WINDOW_OP;

case META_GRAB_OP_COMPOSITOR:
/* begin_grab_op shouldn't be called with META_GRAB_OP_COMPOSITOR. */
g_assert_not_reached ();

case META_GRAB_OP_WAYLAND_POPUP:
return META_EVENT_ROUTE_WAYLAND_POPUP;

Expand Down Expand Up @@ -2053,9 +2049,7 @@ meta_display_end_grab_op (MetaDisplay *display,
* Gets the current grab operation, if any.
*
* Return value: the current grab operation, or %META_GRAB_OP_NONE if
* Mutter doesn't currently have a grab. %META_GRAB_OP_COMPOSITOR will
* be returned if a compositor-plugin modal operation is in effect
* (See mutter_begin_modal_for_plugin())
* Mutter doesn't currently have a grab.
*/
MetaGrabOp
meta_display_get_grab_op (MetaDisplay *display)
Expand Down
4 changes: 0 additions & 4 deletions src/meta/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ typedef enum
* @META_GRAB_OP_KEYBOARD_RESIZING_NE: Resizing NE with keyboard
* @META_GRAB_OP_KEYBOARD_RESIZING_SW: Resizing SW with keyboard
* @META_GRAB_OP_KEYBOARD_RESIZING_NW: Resizing NS with keyboard
* @META_GRAB_OP_COMPOSITOR: Compositor asked for grab
*/

/* The lower 16 bits of the grab operation is its type.
Expand Down Expand Up @@ -154,9 +153,6 @@ typedef enum
/* Window grab ops. */
META_GRAB_OP_WINDOW_BASE,

/* Special grab op when the compositor asked for a grab */
META_GRAB_OP_COMPOSITOR,

/* For when a Wayland client takes a popup grab. */
META_GRAB_OP_WAYLAND_POPUP,

Expand Down
6 changes: 1 addition & 5 deletions src/ui/frames.c
Original file line number Diff line number Diff line change
Expand Up @@ -1643,15 +1643,11 @@ static gboolean
handle_leave_notify_event (MetaUIFrame *frame,
ClutterCrossingEvent *event)
{
MetaGrabOp grab_op;

grab_op = meta_x11_wm_get_grab_op (frame->frames->x11_display);

/* ignore the first LeaveNotify event after opening a window menu
* if it is the result of a compositor grab
*/
frame->maybe_ignore_leave_notify = frame->maybe_ignore_leave_notify &&
grab_op == META_GRAB_OP_COMPOSITOR;
(event->flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0;

if (frame->maybe_ignore_leave_notify)
return FALSE;
Expand Down

0 comments on commit e8ed9ec

Please sign in to comment.