From 84ed992a1890cf3545a346a8c6a119eaea53b932 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 29 Sep 2022 18:50:09 +0200 Subject: [PATCH] core: Port to meta_window_begin_grab_op() There is no longer reason to call meta_display_begin_grab_op() except for window grab operations, and meta_window_begin_grab_op() is a perfectly fine entry point for all window grab operations. Move away from meta_display_begin_grab_op(). Part-of: --- src/core/window.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index d35c7709b..26ca8a73b 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8391,15 +8391,12 @@ meta_window_handle_ungrabbed_event (MetaWindow *window, op |= META_GRAB_OP_WINDOW_DIR_SOUTH; if (op != META_GRAB_OP_WINDOW_BASE) - meta_display_begin_grab_op (display, - window, - op, - TRUE, - FALSE, - button, - 0, - event->any.time, - x, y); + { + meta_window_begin_grab_op (window, + op, + FALSE, + event->any.time); + } } } else if (is_window_grab && (int) button == meta_prefs_get_mouse_button_menu ()) @@ -8414,15 +8411,10 @@ meta_window_handle_ungrabbed_event (MetaWindow *window, { if (window->has_move_func) { - meta_display_begin_grab_op (display, - window, - META_GRAB_OP_MOVING, - TRUE, - FALSE, - button, - 0, - event->any.time, - x, y); + meta_window_begin_grab_op (window, + META_GRAB_OP_MOVING, + FALSE, + event->any.time); } } }