mirror of
https://github.com/brl/mutter.git
synced 2025-02-09 18:04:09 +00:00
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:
parent
f62200a17b
commit
12773cf8e2
@ -3378,8 +3378,8 @@ handle_begin_move (MetaDisplay *display,
|
|||||||
if (window->has_move_func)
|
if (window->has_move_func)
|
||||||
{
|
{
|
||||||
meta_window_begin_grab_op (window,
|
meta_window_begin_grab_op (window,
|
||||||
META_GRAB_OP_KEYBOARD_MOVING,
|
META_GRAB_OP_KEYBOARD_MOVING |
|
||||||
FALSE,
|
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
|
||||||
event->time);
|
event->time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3394,8 +3394,8 @@ handle_begin_resize (MetaDisplay *display,
|
|||||||
if (window->has_resize_func)
|
if (window->has_resize_func)
|
||||||
{
|
{
|
||||||
meta_window_begin_grab_op (window,
|
meta_window_begin_grab_op (window,
|
||||||
META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN,
|
META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN |
|
||||||
FALSE,
|
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
|
||||||
event->time);
|
event->time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6733,7 +6733,6 @@ warp_grab_pointer (MetaWindow *window,
|
|||||||
gboolean
|
gboolean
|
||||||
meta_window_begin_grab_op (MetaWindow *window,
|
meta_window_begin_grab_op (MetaWindow *window,
|
||||||
MetaGrabOp op,
|
MetaGrabOp op,
|
||||||
gboolean frame_action,
|
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
@ -6756,9 +6755,6 @@ meta_window_begin_grab_op (MetaWindow *window,
|
|||||||
y = pos.y;
|
y = pos.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!frame_action)
|
|
||||||
op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED;
|
|
||||||
|
|
||||||
return meta_display_begin_grab_op (window->display,
|
return meta_display_begin_grab_op (window->display,
|
||||||
window,
|
window,
|
||||||
op,
|
op,
|
||||||
@ -8391,9 +8387,9 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
|||||||
|
|
||||||
if (op != META_GRAB_OP_WINDOW_BASE)
|
if (op != META_GRAB_OP_WINDOW_BASE)
|
||||||
{
|
{
|
||||||
|
op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED;
|
||||||
meta_window_begin_grab_op (window,
|
meta_window_begin_grab_op (window,
|
||||||
op,
|
op,
|
||||||
FALSE,
|
|
||||||
event->any.time);
|
event->any.time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8411,8 +8407,8 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
|||||||
if (window->has_move_func)
|
if (window->has_move_func)
|
||||||
{
|
{
|
||||||
meta_window_begin_grab_op (window,
|
meta_window_begin_grab_op (window,
|
||||||
META_GRAB_OP_MOVING,
|
META_GRAB_OP_MOVING |
|
||||||
FALSE,
|
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
|
||||||
event->any.time);
|
event->any.time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,6 @@ void meta_window_get_work_area_all_monitors (MetaWindow *window,
|
|||||||
META_EXPORT
|
META_EXPORT
|
||||||
gboolean meta_window_begin_grab_op (MetaWindow *window,
|
gboolean meta_window_begin_grab_op (MetaWindow *window,
|
||||||
MetaGrabOp op,
|
MetaGrabOp op,
|
||||||
gboolean frame_action,
|
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
|
@ -1559,7 +1559,6 @@ meta_wayland_surface_begin_grab_op (MetaWaylandSurface *surface,
|
|||||||
being moved/resized via a SSD event. */
|
being moved/resized via a SSD event. */
|
||||||
return meta_window_begin_grab_op (window,
|
return meta_window_begin_grab_op (window,
|
||||||
grab_op,
|
grab_op,
|
||||||
TRUE, /* frame_action */
|
|
||||||
meta_display_get_current_time_roundtrip (window->display));
|
meta_display_get_current_time_roundtrip (window->display));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3272,13 +3272,6 @@ meta_window_x11_client_message (MetaWindow *window,
|
|||||||
int button;
|
int button;
|
||||||
guint32 timestamp;
|
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];
|
x_root = event->xclient.data.l[0];
|
||||||
y_root = event->xclient.data.l[1];
|
y_root = event->xclient.data.l[1];
|
||||||
action = event->xclient.data.l[2];
|
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_move_func && op == META_GRAB_OP_KEYBOARD_MOVING) ||
|
||||||
(window->has_resize_func && op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)))
|
(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 &&
|
else if (op != META_GRAB_OP_NONE &&
|
||||||
((window->has_move_func && op == META_GRAB_OP_MOVING) ||
|
((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);
|
"Beginning move/resize with button = %d", button);
|
||||||
meta_window_begin_grab_op (window,
|
meta_window_begin_grab_op (window,
|
||||||
op,
|
op,
|
||||||
frame_action,
|
|
||||||
timestamp);
|
timestamp);
|
||||||
|
|
||||||
button_mask = query_pressed_buttons (window);
|
button_mask = query_pressed_buttons (window);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user