[mutter] window-actor/x11: Freeze/thaw commits on actor freeze/thaw
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-actor/x11: Freeze/thaw commits on actor freeze/thaw
- Date: Thu, 16 Jan 2020 08:51:15 +0000 (UTC)
commit d7a7af1ff200626f9cba9abae2eb4b1ed3efa7a5
Author: Olivier Fourdan <ofourdan redhat com>
Date: Tue Nov 19 14:30:44 2019 +0100
window-actor/x11: Freeze/thaw commits on actor freeze/thaw
When using Xwayland, if the damage get posted before the X11 window
manager/compositor has finished repainting the actors, the intermediate
state will show.
Make sure to hint Xwayland as to when it can post pending damages and
commit the Wayland buffer using the `freeze_commits()/thaw_commits()`
API, based on window actor freeze/thaw.
See-also: https://gitlab.gnome.org/GNOME/mutter/merge_requests/855
See-also: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/316
https://gitlab.gnome.org/GNOME/mutter/merge_requests/942
src/compositor/meta-window-actor-x11.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
index cc694004a..f5b18414e 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -98,6 +98,7 @@ struct _MetaWindowActorX11
gboolean needs_reshape;
gboolean recompute_focused_shadow;
gboolean recompute_unfocused_shadow;
+ gboolean is_frozen;
};
static MetaCullableInterface *cullable_parent_iface;
@@ -1316,6 +1317,18 @@ static void
meta_window_actor_x11_set_frozen (MetaWindowActor *actor,
gboolean frozen)
{
+ MetaWindowActorX11 *actor_x11 = META_WINDOW_ACTOR_X11 (actor);
+ MetaWindow *window = meta_window_actor_get_meta_window (actor);
+
+ if (actor_x11->is_frozen == frozen)
+ return;
+
+ actor_x11->is_frozen = frozen;
+
+ if (frozen)
+ meta_window_x11_freeze_commits (window);
+ else
+ meta_window_x11_thaw_commits (window);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]