Backport regression fixes

This commit is contained in:
Jonas Ådahl 2022-11-17 10:51:25 +01:00
parent b07e6d7e2a
commit 89161ff785
2 changed files with 122 additions and 1 deletions

View File

@ -12,7 +12,7 @@
Name: mutter
Version: 43.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -28,6 +28,13 @@ Patch1: 0001-Revert-build-Do-not-provide-built-sources-as-libmutt.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1936991
Patch2: mutter-42.alpha-disable-tegra.patch
# Revert Clutter optimization causing issues on X11
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2667
# Will be replaced with a proper fix in 43.2
# Backport edge resistance fix
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2687
Patch3: post-43.1-fixes.patch
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(libwacom)
@ -173,6 +180,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Thu Nov 17 2022 Jonas Ådahl <jadahl@redhat.com> - 43.1-2
- Backport regression fixes
* Fri Nov 04 2022 Florian Müllner <fmuellner@redhat.com> - 43.1-1
- Update to 43.1

111
post-43.1-fixes.patch Normal file
View File

@ -0,0 +1,111 @@
From 926567d5533a56ec4b609d814c0bbaf234901ba3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 17 Nov 2022 10:13:45 +0100
Subject: [PATCH 1/2] Revert "clutter/actor: Avoid some stage view updates"
This reverts commit 7e7a639cc5132cf3355e861235f325540fe56548.
---
clutter/clutter/clutter-actor.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 009488a069..4d1856ef77 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -1484,6 +1484,22 @@ clutter_actor_update_map_state (ClutterActor *self,
#endif
}
+static void
+queue_update_stage_views (ClutterActor *actor)
+{
+ while (actor && !actor->priv->needs_update_stage_views)
+ {
+ actor->priv->needs_update_stage_views = TRUE;
+
+ /* We don't really need to update the stage-views of the actors up the
+ * hierarchy, we set the flag anyway though so we can avoid traversing
+ * the whole scenegraph when looking for actors which need an update
+ * in clutter_actor_finish_layout().
+ */
+ actor = actor->priv->parent;
+ }
+}
+
static void queue_update_paint_volume (ClutterActor *actor);
static void
@@ -1528,6 +1544,18 @@ clutter_actor_real_map (ClutterActor *self)
if (priv->unmapped_paint_branch_counter == 0)
{
+ /* We skip unmapped actors when updating the stage-views list, so if
+ * an actors list got invalidated while it was unmapped make sure to
+ * set priv->needs_update_stage_views to TRUE for all actors up the
+ * hierarchy now.
+ */
+ if (priv->needs_update_stage_views)
+ {
+ /* Avoid the early return in queue_update_stage_views() */
+ priv->needs_update_stage_views = FALSE;
+ queue_update_stage_views (self);
+ }
+
/* Avoid the early return in clutter_actor_queue_relayout() */
priv->needs_width_request = FALSE;
priv->needs_height_request = FALSE;
@@ -2479,7 +2507,7 @@ clutter_actor_notify_if_geometry_changed (ClutterActor *self,
static void
absolute_geometry_changed (ClutterActor *actor)
{
- actor->priv->needs_update_stage_views = TRUE;
+ queue_update_stage_views (actor);
}
static ClutterActorTraverseVisitFlags
--
2.38.1
From c0f8a20fbd25d4efa1aae85505eb46ab987f9975 Mon Sep 17 00:00:00 2001
From: John Wudrick <prochronism@gmail.com>
Date: Fri, 4 Nov 2022 02:35:12 +0000
Subject: [PATCH 2/2] window: Update ongoing edge resistance flags with input
Fix a recent regression where edge resistance flags where no
longer updated during the move/resize operation.
Fixes: bd6b14a843 (window: Throttle window move grab updates)
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2492
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2687>
(cherry picked from commit d889aad7cf76f786208c446ce195d4e26f9c0a8d)
---
src/core/window.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/window.c b/src/core/window.c
index d376017166..3b35ee021e 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6021,6 +6021,7 @@ queue_update_move (MetaWindow *window,
MetaCompositor *compositor;
MetaLaters *laters;
+ window->display->grab_last_edge_resistance_flags = flags;
window->display->grab_latest_motion_x = x;
window->display->grab_latest_motion_y = y;
@@ -6166,6 +6167,7 @@ queue_update_resize (MetaWindow *window,
MetaCompositor *compositor;
MetaLaters *laters;
+ window->display->grab_last_edge_resistance_flags = flags;
window->display->grab_latest_motion_x = x;
window->display->grab_latest_motion_y = y;
--
2.38.1