summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2020-11-25 17:40:59 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2020-11-25 17:40:59 +0000
commit11db6a56020cdeccf2e3c93cf54cab07f4f16bb6 (patch)
treef346b00923ae570f19a27e2918b31a9e9a2bc26e
parent2d73fcaedf6499ae334a5f8113ea8be3eaab1ceb (diff)
automatic import of mutter
-rw-r--r--0001-window-props-Also-check-for-actual-values-change.patch150
-rw-r--r--mutter.spec9
2 files changed, 158 insertions, 1 deletions
diff --git a/0001-window-props-Also-check-for-actual-values-change.patch b/0001-window-props-Also-check-for-actual-values-change.patch
new file mode 100644
index 0000000..d5f814f
--- /dev/null
+++ b/0001-window-props-Also-check-for-actual-values-change.patch
@@ -0,0 +1,150 @@
+From adb14b14a8e8bdec3b30657080a26e57dd6fc050 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Mon, 16 Nov 2020 16:50:24 +0100
+Subject: [PATCH] window-props: Also check for actual values change
+
+Commit e28c1ab4 added a hints_have_changed() function to only
+recalculate windows features when the WM_NORMAL_HINTS change.
+
+That function hints_have_changed() however was merely checking whether
+the various XSizeHints flags where flipped, which is not sufficient
+because the hints may remain the same while the actual values are
+changed.
+
+Not checking for the actual value differences would prevent some windows
+from being able to switch fullscreen.
+
+Improve the helper function hints_have_changed() to check not only for
+flags being flipped, but also for the values being changed for each
+relevant XSizeHints flags being set currently.
+
+Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1534
+(cherry picked from commit 06e604cfefdd2eb68bc863cb5600d622a1662880)
+
+Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1574>
+---
+ src/x11/window-props.c | 98 ++++++++++++++++++++++++++++++++++++------
+ 1 file changed, 84 insertions(+), 14 deletions(-)
+
+diff --git a/src/x11/window-props.c b/src/x11/window-props.c
+index d919a2a0e1..d5bd6d2350 100644
+--- a/src/x11/window-props.c
++++ b/src/x11/window-props.c
+@@ -1078,13 +1078,19 @@ reload_update_counter (MetaWindow *window,
+ }
+ }
+
++#define FLAG_IS_ON(hints,flag) \
++ (((hints)->flags & (flag)) != 0)
++
++#define FLAG_IS_OFF(hints,flag) \
++ (((hints)->flags & (flag)) == 0)
++
+ #define FLAG_TOGGLED_ON(old,new,flag) \
+- (((old)->flags & (flag)) == 0 && \
+- ((new)->flags & (flag)) != 0)
++ (FLAG_IS_OFF(old,flag) && \
++ FLAG_IS_ON(new,flag))
+
+ #define FLAG_TOGGLED_OFF(old,new,flag) \
+- (((old)->flags & (flag)) != 0 && \
+- ((new)->flags & (flag)) == 0)
++ (FLAG_IS_ON(old,flag) && \
++ FLAG_IS_OFF(new,flag))
+
+ #define FLAG_CHANGED(old,new,flag) \
+ (FLAG_TOGGLED_ON(old,new,flag) || FLAG_TOGGLED_OFF(old,new,flag))
+@@ -1142,16 +1148,80 @@ static gboolean
+ hints_have_changed (const XSizeHints *old,
+ const XSizeHints *new)
+ {
+- return FLAG_CHANGED (old, new, USPosition) ||
+- FLAG_CHANGED (old, new, USSize) ||
+- FLAG_CHANGED (old, new, PPosition) ||
+- FLAG_CHANGED (old, new, PSize) ||
+- FLAG_CHANGED (old, new, PMinSize) ||
+- FLAG_CHANGED (old, new, PMaxSize) ||
+- FLAG_CHANGED (old, new, PResizeInc) ||
+- FLAG_CHANGED (old, new, PAspect) ||
+- FLAG_CHANGED (old, new, PBaseSize) ||
+- FLAG_CHANGED (old, new, PWinGravity);
++ /* 1. Check if the relevant values have changed if the flag is set. */
++
++ if (FLAG_TOGGLED_ON (old, new, USPosition) ||
++ (FLAG_IS_ON (new, USPosition) &&
++ (old->x != new->x ||
++ old->y != new->y)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, USSize) ||
++ (FLAG_IS_ON (new, USSize) &&
++ (old->width != new->width ||
++ old->height != new->height)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PPosition) ||
++ (FLAG_IS_ON (new, PPosition) &&
++ (old->x != new->x ||
++ old->y != new->y)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PSize) ||
++ (FLAG_IS_ON (new, PSize) &&
++ (old->width != new->width ||
++ old->height != new->height)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PMinSize) ||
++ (FLAG_IS_ON (new, PMinSize) &&
++ (old->min_width != new->min_width ||
++ old->min_height != new->min_height)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PMaxSize) ||
++ (FLAG_IS_ON (new, PMaxSize) &&
++ (old->max_width != new->max_width ||
++ old->max_height != new->max_height)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PResizeInc) ||
++ (FLAG_IS_ON (new, PResizeInc) &&
++ (old->width_inc != new->width_inc ||
++ old->height_inc != new->height_inc)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PAspect) ||
++ (FLAG_IS_ON (new, PAspect) &&
++ (old->min_aspect.x != new->min_aspect.x ||
++ old->min_aspect.y != new->min_aspect.y ||
++ old->max_aspect.x != new->max_aspect.x ||
++ old->max_aspect.y != new->max_aspect.y)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PBaseSize) ||
++ (FLAG_IS_ON (new, PBaseSize) &&
++ (old->base_width != new->base_width ||
++ old->base_height != new->base_height)))
++ return TRUE;
++
++ if (FLAG_TOGGLED_ON (old, new, PWinGravity) ||
++ (FLAG_IS_ON (new, PWinGravity) &&
++ (old->win_gravity != new->win_gravity)))
++ return TRUE;
++
++ /* 2. Check if the flags have been unset. */
++ return FLAG_TOGGLED_OFF (old, new, USPosition) ||
++ FLAG_TOGGLED_OFF (old, new, USSize) ||
++ FLAG_TOGGLED_OFF (old, new, PPosition) ||
++ FLAG_TOGGLED_OFF (old, new, PSize) ||
++ FLAG_TOGGLED_OFF (old, new, PMinSize) ||
++ FLAG_TOGGLED_OFF (old, new, PMaxSize) ||
++ FLAG_TOGGLED_OFF (old, new, PResizeInc) ||
++ FLAG_TOGGLED_OFF (old, new, PAspect) ||
++ FLAG_TOGGLED_OFF (old, new, PBaseSize) ||
++ FLAG_TOGGLED_OFF (old, new, PWinGravity);
+ }
+
+ void
+--
+2.28.0
+
diff --git a/mutter.spec b/mutter.spec
index 3865567..772f80e 100644
--- a/mutter.spec
+++ b/mutter.spec
@@ -8,7 +8,7 @@
Name: mutter
Version: 3.38.1
-Release: 2.1.performance%{?dist}
+Release: 3.1.performance%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@@ -25,6 +25,9 @@ Patch1: mutter-3.38.1~17e9cbe8cbee.patch
# To make s390x build pass
Patch2: 0001-Revert-build-Do-not-provide-built-sources-as-libmutt.patch
+# Fix fullscreen regression (backport from gnome-3-38)
+Patch3: 0001-window-props-Also-check-for-actual-values-change.patch
+
# WIP: clutter-frame-clock: Triple buffering support (v4)
Patch10: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441.patch
@@ -179,6 +182,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
+* Mon Nov 23 2020 Jonas Ådahl <jadahl@redhat.com> - 3.38.1-3
+- Fix fullscreen window regression
+ Resolves: #1900187
+
* Tue Nov 17 2020 Jonas Ådahl <jadahl@redhat.com> - 3.38.1-2
- Backport fixes from gnome-3-38 stable branch
Resolves: #1893375