window: Drop frame_action argument from meta_window_begin_grab_op()

The final effect of this boolean can now be expressed through the
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED flag to MetaGrabOp. Use that
in the relevant places, and drop the argument.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho 2022-09-29 19:21:50 +02:00 committed by Marge Bot
parent f62200a17b
commit 12773cf8e2
5 changed files with 8 additions and 22 deletions

View File

@ -3378,8 +3378,8 @@ handle_begin_move (MetaDisplay *display,
if (window->has_move_func)
{
meta_window_begin_grab_op (window,
META_GRAB_OP_KEYBOARD_MOVING,
FALSE,
META_GRAB_OP_KEYBOARD_MOVING |
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
event->time);
}
}
@ -3394,8 +3394,8 @@ handle_begin_resize (MetaDisplay *display,
if (window->has_resize_func)
{
meta_window_begin_grab_op (window,
META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN,
FALSE,
META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN |
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
event->time);
}
}

View File

@ -6733,7 +6733,6 @@ warp_grab_pointer (MetaWindow *window,
gboolean
meta_window_begin_grab_op (MetaWindow *window,
MetaGrabOp op,
gboolean frame_action,
guint32 timestamp)
{
int x, y;
@ -6756,9 +6755,6 @@ meta_window_begin_grab_op (MetaWindow *window,
y = pos.y;
}
if (!frame_action)
op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED;
return meta_display_begin_grab_op (window->display,
window,
op,
@ -8391,9 +8387,9 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
if (op != META_GRAB_OP_WINDOW_BASE)
{
op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED;
meta_window_begin_grab_op (window,
op,
FALSE,
event->any.time);
}
}
@ -8411,8 +8407,8 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
if (window->has_move_func)
{
meta_window_begin_grab_op (window,
META_GRAB_OP_MOVING,
FALSE,
META_GRAB_OP_MOVING |
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
event->any.time);
}
}

View File

@ -411,7 +411,6 @@ void meta_window_get_work_area_all_monitors (MetaWindow *window,
META_EXPORT
gboolean meta_window_begin_grab_op (MetaWindow *window,
MetaGrabOp op,
gboolean frame_action,
guint32 timestamp);
META_EXPORT

View File

@ -1559,7 +1559,6 @@ meta_wayland_surface_begin_grab_op (MetaWaylandSurface *surface,
being moved/resized via a SSD event. */
return meta_window_begin_grab_op (window,
grab_op,
TRUE, /* frame_action */
meta_display_get_current_time_roundtrip (window->display));
}

View File

@ -3272,13 +3272,6 @@ meta_window_x11_client_message (MetaWindow *window,
int button;
guint32 timestamp;
/* _NET_WM_MOVERESIZE messages are almost certainly going to come from
* clients when users click on the fake "frame" that the client has,
* thus we should also treat such messages as though it were a
* "frame action".
*/
gboolean const frame_action = TRUE;
x_root = event->xclient.data.l[0];
y_root = event->xclient.data.l[1];
action = event->xclient.data.l[2];
@ -3342,7 +3335,7 @@ meta_window_x11_client_message (MetaWindow *window,
((window->has_move_func && op == META_GRAB_OP_KEYBOARD_MOVING) ||
(window->has_resize_func && op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)))
{
meta_window_begin_grab_op (window, op, frame_action, timestamp);
meta_window_begin_grab_op (window, op, timestamp);
}
else if (op != META_GRAB_OP_NONE &&
((window->has_move_func && op == META_GRAB_OP_MOVING) ||
@ -3356,7 +3349,6 @@ meta_window_x11_client_message (MetaWindow *window,
"Beginning move/resize with button = %d", button);
meta_window_begin_grab_op (window,
op,
frame_action,
timestamp);
button_mask = query_pressed_buttons (window);