parent
11e3f0b51d
commit
d5632fd4ae
@ -0,0 +1,65 @@
|
||||
From ce7f606d48f1a422465fd597c33047727993988a Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Wed, 30 Mar 2022 20:59:37 +0200
|
||||
Subject: [PATCH 1/2] clutter: Refactor code marking actors dirty for paint()
|
||||
|
||||
Simplify the function arguments (the origin is just the actor that
|
||||
the function is originally called from), and make it also handle
|
||||
marking as dirty the actor that got the redraw queued up explicitly.
|
||||
|
||||
This makes it a single place where priv->is_dirty is being enabled.
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2353>
|
||||
---
|
||||
clutter/clutter/clutter-actor.c | 16 +++++++---------
|
||||
1 file changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
|
||||
index 59345a7252..2e4b30effc 100644
|
||||
--- a/clutter/clutter/clutter-actor.c
|
||||
+++ b/clutter/clutter/clutter-actor.c
|
||||
@@ -2646,9 +2646,10 @@ _clutter_actor_queue_redraw_on_clones (ClutterActor *self)
|
||||
}
|
||||
|
||||
static void
|
||||
-_clutter_actor_propagate_queue_redraw (ClutterActor *self,
|
||||
- ClutterActor *origin)
|
||||
+_clutter_actor_propagate_queue_redraw (ClutterActor *self)
|
||||
{
|
||||
+ ClutterActor *origin = self;
|
||||
+
|
||||
while (self)
|
||||
{
|
||||
/* no point in queuing a redraw on a destroyed actor */
|
||||
@@ -2657,13 +2658,12 @@ _clutter_actor_propagate_queue_redraw (ClutterActor *self,
|
||||
|
||||
_clutter_actor_queue_redraw_on_clones (self);
|
||||
|
||||
+ self->priv->is_dirty = TRUE;
|
||||
+
|
||||
/* If the queue redraw is coming from a child then the actor has
|
||||
become dirty and any queued effect is no longer valid */
|
||||
if (self != origin)
|
||||
- {
|
||||
- self->priv->is_dirty = TRUE;
|
||||
- self->priv->effect_to_redraw = NULL;
|
||||
- }
|
||||
+ self->priv->effect_to_redraw = NULL;
|
||||
|
||||
/* If the actor isn't visible, we still had to emit the signal
|
||||
* to allow for a ClutterClone, but the appearance of the parent
|
||||
@@ -8105,10 +8105,8 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
|
||||
priv->effect_to_redraw = NULL;
|
||||
}
|
||||
|
||||
- priv->is_dirty = TRUE;
|
||||
-
|
||||
if (!priv->propagated_one_redraw)
|
||||
- _clutter_actor_propagate_queue_redraw (self, self);
|
||||
+ _clutter_actor_propagate_queue_redraw (self);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,59 @@
|
||||
From f820bb35067f1e6b54d56f7652ee333ac8c8c35b Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Wed, 30 Mar 2022 21:02:18 +0200
|
||||
Subject: [PATCH 2/2] clutter: Keep actors dirty if a redraw was queued up
|
||||
during paint()
|
||||
|
||||
In the right combination of circumstances, and given 2 actors (parent
|
||||
actor P with an offscreen effect and child actor C), we may have the
|
||||
following situation happening:
|
||||
|
||||
- A redraw is queued on the actor C, actors C and P are marked as
|
||||
priv->is_dirty and priv->propagated_one_redraw.
|
||||
- During paint() handling we paint actor P, priv->propagated_one_redraw
|
||||
is turned off.
|
||||
- We recurse into child actor C, priv->propagated_one_redraw is turned
|
||||
off.
|
||||
- A new redraw is queued on actor C, actors C and P are marked as
|
||||
priv->is_dirty and priv->propagated_one_redraw.
|
||||
- The paint() method recurses back, actors C and P get priv->is_dirty
|
||||
disabled, priv->propagated_one_redraw remains set.
|
||||
- At this point queueing up more redraws on actor C will not propagate
|
||||
up, because actor C has priv->propagated_one_redraw set, but the
|
||||
parent actor P has priv->is_dirty unset, so the offscreen effect will
|
||||
not get CLUTTER_EFFECT_PAINT_ACTOR_DIRTY and will avoid repainting
|
||||
actor C.
|
||||
|
||||
The end result is that actor C does not redraw again, despite requesting
|
||||
redraws. This situation eventually resolves itself through e.g. relayouts
|
||||
on actor P, but may take some time to happen.
|
||||
|
||||
In order to fix this, consider actors that did get a further redraw
|
||||
request still dirty after paint().
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2188
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2353>
|
||||
---
|
||||
clutter/clutter/clutter-actor.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
|
||||
index 2e4b30effc..23ef03dc1f 100644
|
||||
--- a/clutter/clutter/clutter-actor.c
|
||||
+++ b/clutter/clutter/clutter-actor.c
|
||||
@@ -3840,8 +3840,10 @@ clutter_actor_paint (ClutterActor *self,
|
||||
clutter_paint_node_paint (root_node, paint_context);
|
||||
|
||||
/* If we make it here then the actor has run through a complete
|
||||
- paint run including all the effects so it's no longer dirty */
|
||||
- priv->is_dirty = FALSE;
|
||||
+ * paint run including all the effects so it's no longer dirty,
|
||||
+ * unless a new redraw was queued up.
|
||||
+ */
|
||||
+ priv->is_dirty = priv->propagated_one_redraw;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.35.1
|
||||
|
12
mutter.spec
12
mutter.spec
@ -10,7 +10,7 @@
|
||||
|
||||
Name: mutter
|
||||
Version: 42.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Window and compositing manager based on Clutter
|
||||
|
||||
License: GPLv2+
|
||||
@ -38,6 +38,13 @@ Patch3: 2331.patch
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2299
|
||||
Patch4: 2299.patch
|
||||
|
||||
# Fix input to overview search freezing when using input method
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/issues/2188
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2062660
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2353
|
||||
Patch5: 0001-clutter-Refactor-code-marking-actors-dirty-for-paint.patch
|
||||
Patch6: 0002-clutter-Keep-actors-dirty-if-a-redraw-was-queued-up-.patch
|
||||
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0
|
||||
BuildRequires: pkgconfig(sm)
|
||||
BuildRequires: pkgconfig(libwacom)
|
||||
@ -181,6 +188,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/mutter-%{mutter_api_version}/tests
|
||||
|
||||
%changelog
|
||||
* Thu Mar 31 2022 Adam Williamson <awilliam@redhat.com> - 42.0-3
|
||||
- Backport MR #2353 to fix overview search with input methods (#2062660)
|
||||
|
||||
* Mon Mar 14 2022 Adam Williamson <awilliam@redhat.com> - 42.0-2
|
||||
- Backport MR #2299 to avoid a commonly-encountered crash (#2063381)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user