diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-09-09 13:10:30 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-12-01 20:10:53 +0000 |
commit | a22c66fa5181fa39356d5db724043c35e3c8c834 (patch) | |
tree | 6504065a6db284f8e34cfafab0e68a9600219388 | |
parent | 6a80bc3a54c157517bfe0d2f0ff5154797ec3cb3 (diff) | |
download | mutter-a22c66fa5181fa39356d5db724043c35e3c8c834.tar.gz |
x11: Add intermediate helper function to update X11 window after sync
This function will be added some more logic in future commits.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175>
-rw-r--r-- | src/x11/meta-sync-counter.c | 13 | ||||
-rw-r--r-- | src/x11/window-x11-private.h | 2 | ||||
-rw-r--r-- | src/x11/window-x11.c | 9 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/x11/meta-sync-counter.c b/src/x11/meta-sync-counter.c index 71bd89dbc..f6df167b0 100644 --- a/src/x11/meta-sync-counter.c +++ b/src/x11/meta-sync-counter.c @@ -25,6 +25,7 @@ #include "core/window-private.h" #include "meta/meta-x11-errors.h" #include "x11/meta-x11-display-private.h" +#include "x11/window-x11-private.h" /* Each time the application updates the sync request counter to a new even value * value, we queue a frame into the windows list of frames. Once we're painting @@ -206,12 +207,7 @@ sync_request_timeout (gpointer data) if (window == window->display->grab_window && meta_grab_op_is_resizing (window->display->grab_op)) - { - meta_window_update_resize (window, - window->display->grab_last_edge_resistance_flags, - window->display->grab_latest_motion_x, - window->display->grab_latest_motion_y); - } + meta_window_x11_check_update_resize (window); return G_SOURCE_REMOVE; } @@ -316,10 +312,7 @@ meta_sync_counter_update (MetaSyncCounter *sync_counter, /* This means we are ready for another configure; * no pointer round trip here, to keep in sync */ - meta_window_update_resize (window, - window->display->grab_last_edge_resistance_flags, - window->display->grab_latest_motion_x, - window->display->grab_latest_motion_y); + meta_window_x11_check_update_resize (window); } } diff --git a/src/x11/window-x11-private.h b/src/x11/window-x11-private.h index 5c738a83f..0809c795a 100644 --- a/src/x11/window-x11-private.h +++ b/src/x11/window-x11-private.h @@ -97,6 +97,8 @@ void meta_window_x11_queue_update_icon (MetaWindowX11 *window_x11); void meta_window_x11_initialize_state (MetaWindow *window); +void meta_window_x11_check_update_resize (MetaWindow *window); + G_END_DECLS #endif diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 738e28780..f2df2904f 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -4287,3 +4287,12 @@ meta_window_x11_is_awaiting_sync_response (MetaWindow *window) return meta_sync_counter_is_waiting_response (&priv->sync_counter); } + +void +meta_window_x11_check_update_resize (MetaWindow *window) +{ + meta_window_update_resize (window, + window->display->grab_last_edge_resistance_flags, + window->display->grab_latest_motion_x, + window->display->grab_latest_motion_y); +} |