import mutter-3.32.2-63.el8

This commit is contained in:
CentOS Sources 2022-03-29 09:30:31 -04:00 committed by Stepan Oksanichenko
parent d1f670bc1a
commit d7b2de24e7
5 changed files with 2903 additions and 1 deletions

View File

@ -0,0 +1,150 @@
From 9269b09028ae51c7bb74e9cc9aefafd8eaa882d6 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@posteo.de>
Date: Tue, 16 Apr 2019 23:35:28 +0200
Subject: [PATCH 1/2] wayland: Move check for present window out of the
actor-surface class
All child classes of `MetaWaylandShellSurface` as well as
`MetaWaylandSurfaceRoleXWayland` should only sync their actor if
their toplevel surface has a window. Currently this check is done
in the actor-surface class, but not all surface classes have a
toplevel window, e.g. dnd-surfaces.
Move the check to the right places.
For subsurfaces this assumes that the subsurface is not the child of
a window-less surface (like, as stated above, e.g. a dnd-surface).
If we want to support subsurfaces of window-less surfaces in the future
we have to extend the check here.
But as this is not a regression, ignore this case for now.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/537
(cherry picked from commit 7e2a0ede16bed5671fe55d3d81ccc9f82eebd94b)
---
src/wayland/meta-wayland-actor-surface.c | 7 -------
src/wayland/meta-wayland-shell-surface.c | 20 ++++++++++++++++++++
src/wayland/meta-wayland-subsurface.c | 5 ++++-
src/wayland/meta-xwayland.c | 18 ++++++++++++++++++
4 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c
index 037dd901ab..e2143e51f1 100644
--- a/src/wayland/meta-wayland-actor-surface.c
+++ b/src/wayland/meta-wayland-actor-surface.c
@@ -295,9 +295,6 @@ meta_wayland_actor_surface_commit (MetaWaylandSurfaceRole *surface_role,
META_WAYLAND_ACTOR_SURFACE (surface_role);
MetaWaylandActorSurfacePrivate *priv =
meta_wayland_actor_surface_get_instance_private (actor_surface);
- MetaWaylandSurface *surface =
- meta_wayland_surface_role_get_surface (surface_role);
- MetaWaylandSurface *toplevel_surface;
if (!wl_list_empty (&pending->frame_callback_list) &&
priv->actor &&
@@ -311,10 +308,6 @@ meta_wayland_actor_surface_commit (MetaWaylandSurfaceRole *surface_role,
meta_wayland_actor_surface_queue_frame_callbacks (actor_surface, pending);
- toplevel_surface = meta_wayland_surface_get_toplevel (surface);
- if (!toplevel_surface || !toplevel_surface->window)
- return;
-
meta_wayland_actor_surface_sync_actor_state (actor_surface);
}
diff --git a/src/wayland/meta-wayland-shell-surface.c b/src/wayland/meta-wayland-shell-surface.c
index 04f2aaeea8..f8354ab7c5 100644
--- a/src/wayland/meta-wayland-shell-surface.c
+++ b/src/wayland/meta-wayland-shell-surface.c
@@ -175,6 +175,22 @@ meta_wayland_shell_surface_surface_commit (MetaWaylandSurfaceRole *surface_role
window->buffer_rect.height = cogl_texture_get_height (texture) * scale;
}
+static void
+meta_wayland_shell_surface_sync_actor_state (MetaWaylandActorSurface *actor_surface)
+{
+ MetaWaylandSurfaceRole *surface_role =
+ META_WAYLAND_SURFACE_ROLE (actor_surface);
+ MetaWaylandSurface *surface =
+ meta_wayland_surface_role_get_surface (surface_role);
+ MetaWaylandActorSurfaceClass *actor_surface_class =
+ META_WAYLAND_ACTOR_SURFACE_CLASS (meta_wayland_shell_surface_parent_class);
+ MetaWaylandSurface *toplevel_surface;
+
+ toplevel_surface = meta_wayland_surface_get_toplevel (surface);
+ if (toplevel_surface && toplevel_surface->window)
+ actor_surface_class->sync_actor_state (actor_surface);
+}
+
static void
meta_wayland_shell_surface_init (MetaWaylandShellSurface *role)
{
@@ -185,6 +201,10 @@ meta_wayland_shell_surface_class_init (MetaWaylandShellSurfaceClass *klass)
{
MetaWaylandSurfaceRoleClass *surface_role_class =
META_WAYLAND_SURFACE_ROLE_CLASS (klass);
+ MetaWaylandActorSurfaceClass *actor_surface_class =
+ META_WAYLAND_ACTOR_SURFACE_CLASS (klass);
surface_role_class->commit = meta_wayland_shell_surface_surface_commit;
+ actor_surface_class->sync_actor_state =
+ meta_wayland_shell_surface_sync_actor_state;
}
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c
index c7059b99a2..9a7ff3ec12 100644
--- a/src/wayland/meta-wayland-subsurface.c
+++ b/src/wayland/meta-wayland-subsurface.c
@@ -199,8 +199,11 @@ meta_wayland_subsurface_sync_actor_state (MetaWaylandActorSurface *actor_surface
meta_wayland_surface_role_get_surface (surface_role);
MetaWaylandActorSurfaceClass *actor_surface_class =
META_WAYLAND_ACTOR_SURFACE_CLASS (meta_wayland_subsurface_parent_class);
+ MetaWaylandSurface *toplevel_surface;
- actor_surface_class->sync_actor_state (actor_surface);
+ toplevel_surface = meta_wayland_surface_get_toplevel (surface);
+ if (toplevel_surface && toplevel_surface->window)
+ actor_surface_class->sync_actor_state (actor_surface);
sync_actor_subsurface_state (surface);
}
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 6e4b9a8ffd..b71c638d93 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -794,6 +794,20 @@ xwayland_surface_get_toplevel (MetaWaylandSurfaceRole *surface_role)
return meta_wayland_surface_role_get_surface (surface_role);
}
+static void
+xwayland_surface_sync_actor_state (MetaWaylandActorSurface *actor_surface)
+{
+ MetaWaylandSurfaceRole *surface_role =
+ META_WAYLAND_SURFACE_ROLE (actor_surface);
+ MetaWaylandSurface *surface =
+ meta_wayland_surface_role_get_surface (surface_role);
+ MetaWaylandActorSurfaceClass *actor_surface_class =
+ META_WAYLAND_ACTOR_SURFACE_CLASS (meta_wayland_surface_role_xwayland_parent_class);
+
+ if (surface->window)
+ actor_surface_class->sync_actor_state (actor_surface);
+}
+
static void
meta_wayland_surface_role_xwayland_init (MetaWaylandSurfaceRoleXWayland *role)
{
@@ -804,9 +818,13 @@ meta_wayland_surface_role_xwayland_class_init (MetaWaylandSurfaceRoleXWaylandCla
{
MetaWaylandSurfaceRoleClass *surface_role_class =
META_WAYLAND_SURFACE_ROLE_CLASS (klass);
+ MetaWaylandActorSurfaceClass *actor_surface_class =
+ META_WAYLAND_ACTOR_SURFACE_CLASS (klass);
surface_role_class->get_toplevel = xwayland_surface_get_toplevel;
+ actor_surface_class->sync_actor_state = xwayland_surface_sync_actor_state;
+
xwayland_surface_signals[XWAYLAND_SURFACE_WINDOW_ASSOCIATED] =
g_signal_new ("window-associated",
G_TYPE_FROM_CLASS (klass),
--
2.31.1

View File

@ -0,0 +1,38 @@
From f37ef55525777f742051cb988341fa1bab403666 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@posteo.de>
Date: Mon, 15 Apr 2019 02:02:10 +0200
Subject: [PATCH 2/2] wayland/dnd-surface: Propagate commit to parent class
We need to call the underlying actor-surface so the actor
state is synced, otherwise surface state like the scale factor
does not get applied.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/550
https://gitlab.gnome.org/GNOME/mutter/merge_requests/537
(cherry picked from commit 01d0316fd703872a2470a351f906ffa4605a647e)
---
src/wayland/meta-wayland-dnd-surface.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/wayland/meta-wayland-dnd-surface.c b/src/wayland/meta-wayland-dnd-surface.c
index 8ddeb2a7bd..7aa7e3be2f 100644
--- a/src/wayland/meta-wayland-dnd-surface.c
+++ b/src/wayland/meta-wayland-dnd-surface.c
@@ -51,9 +51,13 @@ dnd_surface_commit (MetaWaylandSurfaceRole *surface_role,
{
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
+ MetaWaylandSurfaceRoleClass *surface_role_class =
+ META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_surface_role_dnd_parent_class);
meta_wayland_compositor_add_frame_callback_surface (surface->compositor,
surface);
+
+ surface_role_class->commit (surface_role, pending);
}
static void
--
2.31.1

View File

@ -0,0 +1,333 @@
From 529eb8fa3a15e0ae5bf131b1855a117c8a1a026e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Tue, 8 Feb 2022 17:14:06 +0100
Subject: [PATCH 1/2] shaped-texture: Pass along the snippet to the texture
tower
The snippet is used make sure the right source is sampled in the shader.
This wasn't done in the texture tower, meaning the textures from the
tower were not correct.
Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/528
---
src/compositor/meta-shaped-texture.c | 2 ++
src/compositor/meta-texture-tower.c | 27 +++++++++++++++++++++++++++
src/compositor/meta-texture-tower.h | 3 +++
3 files changed, 32 insertions(+)
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 9cae4df07d74..32af6bdc19d7 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -1204,6 +1204,8 @@ meta_shaped_texture_set_snippet (MetaShapedTexture *stex,
g_clear_pointer (&stex->snippet, cogl_object_unref);
if (snippet)
stex->snippet = cogl_object_ref (snippet);
+
+ meta_texture_tower_set_snippet (stex->paint_tower, snippet);
}
/**
diff --git a/src/compositor/meta-texture-tower.c b/src/compositor/meta-texture-tower.c
index a41cdc89dd94..374e1af151ad 100644
--- a/src/compositor/meta-texture-tower.c
+++ b/src/compositor/meta-texture-tower.c
@@ -63,6 +63,7 @@ struct _MetaTextureTower
CoglOffscreen *fbos[MAX_TEXTURE_LEVELS];
Box invalid[MAX_TEXTURE_LEVELS];
CoglPipeline *pipeline_template;
+ CoglSnippet *snippet;
};
/**
@@ -98,6 +99,7 @@ meta_texture_tower_free (MetaTextureTower *tower)
cogl_object_unref (tower->pipeline_template);
meta_texture_tower_set_base_texture (tower, NULL);
+ cogl_clear_object (&tower->snippet);
g_slice_free (MetaTextureTower, tower);
}
@@ -226,6 +228,28 @@ meta_texture_tower_update_area (MetaTextureTower *tower,
}
}
+void
+meta_texture_tower_set_snippet (MetaTextureTower *tower,
+ CoglSnippet *snippet)
+{
+ int i;
+
+ if (tower->snippet == snippet)
+ return;
+
+ g_clear_pointer (&tower->snippet, cogl_object_unref);
+
+ if (snippet)
+ tower->snippet = cogl_object_ref (snippet);
+
+ for (i = 1; i < tower->n_levels; i++)
+ {
+ cogl_clear_object (&tower->textures[i]);
+ g_clear_object (&tower->fbos[i]);
+ }
+ cogl_clear_object (&tower->pipeline_template);
+}
+
/* It generally looks worse if we scale up a window texture by even a
* small amount than if we scale it down using bilinear filtering, so
* we always pick the *larger* adjacent level. */
@@ -420,6 +444,9 @@ texture_tower_revalidate (MetaTextureTower *tower,
pipeline = cogl_pipeline_copy (tower->pipeline_template);
cogl_pipeline_set_layer_texture (pipeline, 0, tower->textures[level - 1]);
+ if (tower->snippet && level == 1)
+ cogl_pipeline_add_layer_snippet (pipeline, 0, tower->snippet);
+
cogl_framebuffer_draw_textured_rectangle (fb, pipeline,
invalid->x1, invalid->y1,
invalid->x2, invalid->y2,
diff --git a/src/compositor/meta-texture-tower.h b/src/compositor/meta-texture-tower.h
index 6a39e4184200..e3cfe3608b8f 100644
--- a/src/compositor/meta-texture-tower.h
+++ b/src/compositor/meta-texture-tower.h
@@ -62,6 +62,9 @@ void meta_texture_tower_update_area (MetaTextureTower *tower,
int height);
CoglTexture *meta_texture_tower_get_paint_texture (MetaTextureTower *tower);
+void meta_texture_tower_set_snippet (MetaTextureTower *tower,
+ CoglSnippet *snippet);
+
G_END_DECLS
#endif /* __META_TEXTURE_TOWER_H__ */
--
2.34.1
From 4827e201b341ac4dd0b4ca697df46946b19ae14c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Mon, 21 Feb 2022 18:12:25 +0100
Subject: [PATCH 2/2] shaped-texture: Paint with the right layer snippet
When we get passed a "snippet" to the shaped texture, it's added as a
pipeline layer snippet to change how the source texture is sampled. When
we draw from a texture tower however we have allocated regular textures
which doesn't need any special layer snippet, so create separate
pipelines for those that doesn't use that snippet.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/528
---
src/compositor/meta-shaped-texture.c | 135 +++++++++++++++++++++------
1 file changed, 104 insertions(+), 31 deletions(-)
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 32af6bdc19d7..705d27d5b842 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -96,8 +96,12 @@ struct _MetaShapedTexture
CoglSnippet *snippet;
CoglPipeline *base_pipeline;
+ CoglPipeline *unmasked_pipeline;
+ CoglPipeline *unmasked_tower_pipeline;
CoglPipeline *masked_pipeline;
+ CoglPipeline *masked_tower_pipeline;
CoglPipeline *unblended_pipeline;
+ CoglPipeline *unblended_tower_pipeline;
gboolean is_y_inverted;
@@ -281,8 +285,12 @@ static void
meta_shaped_texture_reset_pipelines (MetaShapedTexture *stex)
{
g_clear_pointer (&stex->base_pipeline, cogl_object_unref);
+ g_clear_pointer (&stex->unmasked_pipeline, cogl_object_unref);
+ g_clear_pointer (&stex->unmasked_tower_pipeline, cogl_object_unref);
g_clear_pointer (&stex->masked_pipeline, cogl_object_unref);
+ g_clear_pointer (&stex->masked_tower_pipeline, cogl_object_unref);
g_clear_pointer (&stex->unblended_pipeline, cogl_object_unref);
+ g_clear_pointer (&stex->unblended_tower_pipeline, cogl_object_unref);
}
static void
@@ -385,9 +393,6 @@ get_base_pipeline (MetaShapedTexture *stex,
cogl_pipeline_set_layer_matrix (pipeline, 1, &matrix);
}
- if (stex->snippet)
- cogl_pipeline_add_layer_snippet (pipeline, 0, stex->snippet);
-
stex->base_pipeline = pipeline;
return stex->base_pipeline;
@@ -395,50 +400,118 @@ get_base_pipeline (MetaShapedTexture *stex,
static CoglPipeline *
get_unmasked_pipeline (MetaShapedTexture *stex,
- CoglContext *ctx)
+ CoglContext *ctx,
+ CoglTexture *tex)
{
- return get_base_pipeline (stex, ctx);
+ if (stex->texture == tex)
+ {
+ CoglPipeline *pipeline;
+
+ if (stex->unmasked_pipeline)
+ return stex->unmasked_pipeline;
+
+ pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+ if (stex->snippet)
+ cogl_pipeline_add_layer_snippet (pipeline, 0, stex->snippet);
+
+ stex->unmasked_pipeline = pipeline;
+ return pipeline;
+ }
+ else
+ {
+ CoglPipeline *pipeline;
+
+ if (stex->unmasked_tower_pipeline)
+ return stex->unmasked_tower_pipeline;
+
+ pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+ stex->unmasked_tower_pipeline = pipeline;
+ return pipeline;
+ }
}
static CoglPipeline *
get_masked_pipeline (MetaShapedTexture *stex,
- CoglContext *ctx)
+ CoglContext *ctx,
+ CoglTexture *tex)
{
- CoglPipeline *pipeline;
+ if (stex->texture == tex)
+ {
+ CoglPipeline *pipeline;
- if (stex->masked_pipeline)
- return stex->masked_pipeline;
+ if (stex->masked_pipeline)
+ return stex->masked_pipeline;
- pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
- cogl_pipeline_set_layer_combine (pipeline, 1,
- "RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
- NULL);
+ pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+ cogl_pipeline_set_layer_combine (pipeline, 1,
+ "RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
+ NULL);
+ if (stex->snippet)
+ cogl_pipeline_add_layer_snippet (pipeline, 0, stex->snippet);
- stex->masked_pipeline = pipeline;
+ stex->masked_pipeline = pipeline;
+ return pipeline;
+ }
+ else
+ {
+ CoglPipeline *pipeline;
+
+ if (stex->masked_tower_pipeline)
+ return stex->masked_tower_pipeline;
- return pipeline;
+ pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+ cogl_pipeline_set_layer_combine (pipeline, 1,
+ "RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
+ NULL);
+
+ stex->masked_tower_pipeline = pipeline;
+ return pipeline;
+ }
}
static CoglPipeline *
get_unblended_pipeline (MetaShapedTexture *stex,
- CoglContext *ctx)
+ CoglContext *ctx,
+ CoglTexture *tex)
{
- CoglPipeline *pipeline;
- CoglColor color;
+ if (stex->texture == tex)
+ {
+ CoglPipeline *pipeline;
+ CoglColor color;
- if (stex->unblended_pipeline)
- return stex->unblended_pipeline;
+ if (stex->unblended_pipeline)
+ return stex->unblended_pipeline;
- pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
- cogl_color_init_from_4ub (&color, 255, 255, 255, 255);
- cogl_pipeline_set_blend (pipeline,
- "RGBA = ADD (SRC_COLOR, 0)",
- NULL);
- cogl_pipeline_set_color (pipeline, &color);
+ pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+ cogl_color_init_from_4ub (&color, 255, 255, 255, 255);
+ cogl_pipeline_set_blend (pipeline,
+ "RGBA = ADD (SRC_COLOR, 0)",
+ NULL);
+ cogl_pipeline_set_color (pipeline, &color);
+ if (stex->snippet)
+ cogl_pipeline_add_layer_snippet (pipeline, 0, stex->snippet);
- stex->unblended_pipeline = pipeline;
+ stex->unblended_pipeline = pipeline;
+ return pipeline;
+ }
+ else
+ {
+ CoglPipeline *pipeline;
+ CoglColor color;
- return pipeline;
+ if (stex->unblended_tower_pipeline)
+ return stex->unblended_tower_pipeline;
+
+ pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+ cogl_color_init_from_4ub (&color, 255, 255, 255, 255);
+ cogl_pipeline_set_blend (pipeline,
+ "RGBA = ADD (SRC_COLOR, 0)",
+ NULL);
+ cogl_pipeline_set_color (pipeline, &color);
+
+ stex->unblended_tower_pipeline = pipeline;
+ return pipeline;
+ }
}
static void
@@ -714,7 +787,7 @@ do_paint (MetaShapedTexture *stex,
if (!cairo_region_is_empty (region))
{
- opaque_pipeline = get_unblended_pipeline (stex, ctx);
+ opaque_pipeline = get_unblended_pipeline (stex, ctx, paint_tex);
cogl_pipeline_set_layer_texture (opaque_pipeline, 0, paint_tex);
cogl_pipeline_set_layer_filters (opaque_pipeline, 0, filter, filter);
@@ -750,11 +823,11 @@ do_paint (MetaShapedTexture *stex,
if (stex->mask_texture == NULL)
{
- blended_pipeline = get_unmasked_pipeline (stex, ctx);
+ blended_pipeline = get_unmasked_pipeline (stex, ctx, paint_tex);
}
else
{
- blended_pipeline = get_masked_pipeline (stex, ctx);
+ blended_pipeline = get_masked_pipeline (stex, ctx, paint_tex);
cogl_pipeline_set_layer_texture (blended_pipeline, 1, stex->mask_texture);
cogl_pipeline_set_layer_filters (blended_pipeline, 1, filter, filter);
}
--
2.34.1

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
Name: mutter
Version: 3.32.2
Release: 59%{?dist}
Release: 63%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -188,6 +188,15 @@ Patch521: xwayland-xauth-xhost-user.patch
# Backport fixes avoiding frozen partly off-screen clients (#1989035)
Patch522: wayland-frame-callback-rework.patch
# Backport fix avoiding regression due to the above changes (#1999120)
Patch523: 0001-wayland-Move-check-for-present-window-out-of-the-act.patch
Patch524: 0002-wayland-dnd-surface-Propagate-commit-to-parent-class.patch
# Backport monitor configuration policy feature (#2001655)
Patch525: monitor-config-policy.patch
# Backport EGLStream overview fixes (#1977721)
Patch526: eglstream-overview-fixes.patch
BuildRequires: chrpath
BuildRequires: pango-devel
@ -330,6 +339,22 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Thu Feb 24 2022 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-63
- Fix EGLStream overview fixes backport
Related: #1977721
* Mon Feb 21 2022 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-62
- Backport EGLStream overview fixes
Resolves: #1977721
* Fri Feb 04 2022 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-61
- Backport monitor configuration policy feature
Resolves: #2001655
* Mon Aug 30 2021 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-60
- Backport fix avoiding DND regression
Resolves: #2000905
* Fri Aug 06 2021 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-59
- Backport fixes avoiding frozen partly off-screen clients
Resolves: #1989035