core: Pass "frame action" grab operations as an "unconstrained" grab op

The frame_action boolean is only used by constraints.c code, in order to
determine whether a moving window should be able to move past the top
bar or not.

We can avoid the special casing by passing this information as a
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED flag passed with the grab op.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho
2022-09-29 15:55:11 +02:00
committed by Marge Bot
parent 589ec26b04
commit 2d8fa26c8e
4 changed files with 12 additions and 4 deletions

View File

@ -1769,7 +1769,8 @@ constrain_titlebar_visible (MetaWindow *window,
* clicking on the frame to start the move.
*/
unconstrained_user_action =
info->is_user_action && !window->display->grab_frame_action;
info->is_user_action &&
(window->display->grab_op & META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED) != 0;
/* Exit early if we know the constraint won't apply--note that this constraint
* is only meant for normal windows (e.g. we don't want docks to be shoved