diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c index b7032e0ba..2c0bd9939 100644 --- a/src/compositor/meta-window-actor-x11.c +++ b/src/compositor/meta-window-actor-x11.c @@ -40,6 +40,7 @@ #include "meta/meta-x11-errors.h" #include "meta/window.h" #include "x11/meta-x11-display-private.h" +#include "x11/window-x11.h" enum { @@ -1213,6 +1214,7 @@ static void meta_window_actor_x11_post_paint (MetaWindowActor *actor) { MetaWindowActorX11 *actor_x11 = META_WINDOW_ACTOR_X11 (actor); + MetaWindow *window; actor_x11->repaint_scheduled = FALSE; @@ -1238,6 +1240,14 @@ meta_window_actor_x11_post_paint (MetaWindowActor *actor) actor_x11->needs_frame_drawn = FALSE; } + + /* This is for Xwayland, and a no-op on plain Xorg */ + window = meta_window_actor_get_meta_window (actor); + if (meta_window_x11_should_thaw_after_paint (window)) + { + meta_window_x11_thaw_commits (window); + meta_window_x11_set_thaw_after_paint (window, FALSE); + } } static gboolean diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index fdd86efa6..93cfa8e0d 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -1448,6 +1448,16 @@ meta_window_x11_move_resize_internal (MetaWindow *window, (window->size_hints.flags & USPosition))) need_configure_notify = TRUE; + /* If resizing, freeze commits - This is for Xwayland, and a no-op on Xorg */ + if (need_resize_client || need_resize_frame) + { + if (!meta_window_x11_should_thaw_after_paint (window)) + { + meta_window_x11_set_thaw_after_paint (window, TRUE); + meta_window_x11_freeze_commits (window); + } + } + /* The rest of this function syncs our new size/pos with X as * efficiently as possible */