From e6d0e0fda6881feb2e80c2a0cd1ba2ccbb98169c Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 21 Oct 2022 10:59:32 +0200 Subject: [PATCH] compositor: Add method to update MetaWindowDrag after resizes Since SSD X11 windows require synchronization between frame and client windows on resizes, updates do not always happen immediately but in control of external factors (i.e. when both windows become to have a coherent size). This method will be used to update the window position between resize/sync operations. Part-of: --- src/compositor/meta-window-drag.c | 9 +++++++++ src/compositor/meta-window-drag.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/compositor/meta-window-drag.c b/src/compositor/meta-window-drag.c index 83282aa83..49cc37d0f 100644 --- a/src/compositor/meta-window-drag.c +++ b/src/compositor/meta-window-drag.c @@ -1774,3 +1774,12 @@ meta_window_drag_begin (MetaWindowDrag *window_drag, return TRUE; } + +void +meta_window_drag_update_resize (MetaWindowDrag *window_drag) +{ + update_resize (window_drag, + window_drag->last_edge_resistance_flags, + window_drag->latest_motion_x, + window_drag->latest_motion_y); +} diff --git a/src/compositor/meta-window-drag.h b/src/compositor/meta-window-drag.h index 65f3e135e..05690515c 100644 --- a/src/compositor/meta-window-drag.h +++ b/src/compositor/meta-window-drag.h @@ -37,4 +37,6 @@ gboolean meta_window_drag_begin (MetaWindowDrag *drag, void meta_window_drag_end (MetaWindowDrag *drag); +void meta_window_drag_update_resize (MetaWindowDrag *drag); + #endif /* META_WINDOW_DRAG_H */