[mutter/f21] Backport fix for RH #1133166

drago01 drago01 at fedoraproject.org
Tue Aug 26 17:02:10 UTC 2014


commit 64e61654acf9a40977a05b91b238aa6d1b954383
Author: Adel Gadllah <adel.gadllah at gmail.com>
Date:   Tue Aug 26 19:02:06 2014 +0200

    Backport fix for  RH #1133166

 ...e-actor-Fix-is_argb32-for-unredirected-wi.patch |   43 ++++++++++++++++++++
 mutter.spec                                        |    7 +++-
 2 files changed, 49 insertions(+), 1 deletions(-)
---
diff --git a/0001-meta-surface-actor-Fix-is_argb32-for-unredirected-wi.patch b/0001-meta-surface-actor-Fix-is_argb32-for-unredirected-wi.patch
new file mode 100644
index 0000000..4446d32
--- /dev/null
+++ b/0001-meta-surface-actor-Fix-is_argb32-for-unredirected-wi.patch
@@ -0,0 +1,43 @@
+From d15bce3e4aff06e4a70f156f41eec73f4089cd16 Mon Sep 17 00:00:00 2001
+From: Adel Gadllah <adel.gadllah at gmail.com>
+Date: Tue, 26 Aug 2014 18:22:33 +0200
+Subject: [PATCH] meta-surface-actor: Fix is_argb32 for unredirected windows
+
+meta_surface_actor_is_argb32 assumes that lack of stex means that a window is
+ARGB32. When we unredirect a window we detach the texture so we end up without
+a texture. Given that should_unredirect returns FALSE when a window is argb32,
+we know that this window is indeed not ARGB32.
+
+Returing TRUE in that case causes us to flip between redirected and
+unredirected on every paint.
+
+So fix that by returning FALSE in that case.
+---
+ src/compositor/meta-surface-actor.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
+index e7e3a02..bb85478 100644
+--- a/src/compositor/meta-surface-actor.c
++++ b/src/compositor/meta-surface-actor.c
+@@ -280,9 +280,15 @@ meta_surface_actor_is_argb32 (MetaSurfaceActor *self)
+   CoglTexture *texture = meta_shaped_texture_get_texture (stex);
+ 
+   /* If we don't have a texture, like during initialization, assume
+-   * that we're ARGB32. */
++   * that we're ARGB32.
++   *
++   * If we are unredirected and we have no texture assume that we are
++   * not ARGB32 otherwise we wouldn't be unredirected in the first
++   * place. This prevents us from continually redirecting and
++   * unredirecting on every paint.
++   */
+   if (!texture)
+-    return TRUE;
++    return !meta_surface_actor_is_unredirected (self);
+ 
+   switch (cogl_texture_get_components (texture))
+     {
+-- 
+1.9.3
+
diff --git a/mutter.spec b/mutter.spec
index d43f65f..4fcfd8f 100644
--- a/mutter.spec
+++ b/mutter.spec
@@ -2,7 +2,7 @@
 
 Name:          mutter
 Version:       3.13.90
-Release:       3%{?dist}
+Release:       4%{?dist}
 Summary:       Window and compositing manager based on Clutter
 
 Group:         User Interface/Desktops
@@ -12,6 +12,7 @@ URL:           http://www.gnome.org
 Source0:       http://download.gnome.org/sources/%{name}/3.13/%{name}-%{version}.tar.xz
 # rhbz1103221 From upstream git, drop when rebasing
 Patch1:        0001-workspace-Smarten-assert-in-light-of-O-R-windows.patch
+Patch2:        0001-meta-surface-actor-Fix-is_argb32-for-unredirected-wi.patch
 
 BuildRequires: clutter-devel >= %{clutter_version}
 BuildRequires: pango-devel
@@ -78,6 +79,7 @@ utilities for testing Metacity/Mutter themes.
 %prep
 %setup -q
 %patch1 -p1
+%patch2 -p1
 
 %build
 (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
@@ -142,6 +144,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %exclude %{_datadir}/gtk-doc
 
 %changelog
+* Tue Aug 26 2014 Adel Gadllah <adel.gadllah at gmail.com> - 3.13.90-4
+- Apply fix for RH #1133166
+
 * Mon Aug 25 2014 Hans de Goede <hdegoede at redhat.com> - 3.13.90-3
 - Add a patch from upstream fixing gnome-shell crashing non stop on
   multi monitor setups (rhbz#1103221)


More information about the scm-commits mailing list