Upgrade to 3.38.4

Update Version, Release, BuildRequires, Obsoletes
Delete patches which existed in new version, add one patch
Use meson rebuild. update stage 'install', 'files'
This commit is contained in:
weijin-deng 2021-06-03 18:22:56 +08:00
parent c320d7ef29
commit 3596609bc7
10 changed files with 63 additions and 408 deletions

View File

@ -1,94 +0,0 @@
From 71a62bb18fe3aebc6668bd37ef6917398ef71ae1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Sat, 20 Oct 2018 15:46:37 +0200
Subject: [PATCH 1/2] constraints: Make current placement rule stack allocated
We're not going to keep it past the function scope, so no reason to put
it on the heap. We also didn't free it, so this'll fix a memory leak.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
---
src/core/constraints.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/core/constraints.c b/src/core/constraints.c
index a205ea0fd7..3652b3d8e1 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -787,7 +787,7 @@ constrain_custom_rule (MetaWindow *window,
MetaPlacementRule *placement_rule;
MetaRectangle intersection;
gboolean constraint_satisfied;
- MetaPlacementRule *current_rule;
+ MetaPlacementRule current_rule;
MetaWindow *parent;
MetaRectangle parent_rect;
@@ -820,25 +820,24 @@ constrain_custom_rule (MetaWindow *window,
if (check_only)
return constraint_satisfied;
- current_rule = g_new0 (MetaPlacementRule, 1);
- *current_rule = *placement_rule;
+ current_rule = *placement_rule;
if (constraint_satisfied)
goto done;
if (info->current.width != intersection.width &&
- (current_rule->constraint_adjustment &
+ (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X))
{
- try_flip_window_position (window, info, current_rule,
+ try_flip_window_position (window, info, &current_rule,
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X,
&info->current, &intersection);
}
if (info->current.height != intersection.height &&
- (current_rule->constraint_adjustment &
+ (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y))
{
- try_flip_window_position (window, info, current_rule,
+ try_flip_window_position (window, info, &current_rule,
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y,
&info->current, &intersection);
}
@@ -852,7 +851,7 @@ constrain_custom_rule (MetaWindow *window,
if (constraint_satisfied)
goto done;
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_X)
{
if (info->current.x != intersection.x)
@@ -860,7 +859,7 @@ constrain_custom_rule (MetaWindow *window,
else if (info->current.width != intersection.width)
info->current.x -= info->current.width - intersection.width;
}
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_Y)
{
if (info->current.y != intersection.y)
@@ -878,13 +877,13 @@ constrain_custom_rule (MetaWindow *window,
if (constraint_satisfied)
goto done;
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_X)
{
info->current.x = intersection.x;
info->current.width = intersection.width;
}
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_Y)
{
info->current.y = intersection.y;
--
2.19.1

View File

@ -1,34 +0,0 @@
From 5e1e1fa78af7c91a9ba209c3abe71fff4e6a25d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 11 Oct 2018 15:16:26 +0200
Subject: [PATCH] monitor-manager: Don't use switch-config when ensuring
configuration
Switch-configs are only to be used in certain circumstances (see
meta_monitor_manager_can_switch_config()) so when ensuring
configuration and attempting to create a linear configuration, use the
linear configuration constructor function directly without going via the
switch config method, otherwise we might incorrectly fall back to the
fallback configuration (only enable primary monitor).
---
src/backends/meta-monitor-manager.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index baed7521dd..d9236b928b 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -561,9 +561,7 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
g_clear_object (&config);
}
- config =
- meta_monitor_config_manager_create_for_switch_config (manager->config_manager,
- META_MONITOR_SWITCH_CONFIG_ALL_LINEAR);
+ config = meta_monitor_config_manager_create_linear (manager->config_manager);
if (config)
{
if (!meta_monitor_manager_apply_monitors_config (manager,
--
2.17.1

View File

@ -1,127 +0,0 @@
From 63124e3e8a675725c729d4a99b994a83517a5c1a Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 18 Oct 2018 02:08:24 +0200
Subject: [PATCH] wayland: Defer text_input.done on an idle
IBus naturally doesn't know how to implement the text-input protocol,
and some input methods emit event streams that are incompatible with the
protocol, if not assumed to be part of an grouped series of events. As
IBus doesn't have any API to let us know about such groupings, let's
fake it by adding a specially crafted idle callback.
The idle callback has a known limitation; if there is an idle callback
with a higher priority, that either doesn't remove itself, or
reschedules itself before the next idle, we'll never get triggered.
This, however, is unlikely to actually be the bigger problem in such
situations, as it'd likely mean we'd have a 100% CPU bug.
https://gitlab.gnome.org/GNOME/gtk/issues/1365
---
src/wayland/meta-wayland-text-input.c | 60 ++++++++++++++++++++++++---
1 file changed, 54 insertions(+), 6 deletions(-)
diff --git a/src/wayland/meta-wayland-text-input.c b/src/wayland/meta-wayland-text-input.c
index 8681430217..0493760bd1 100644
--- a/src/wayland/meta-wayland-text-input.c
+++ b/src/wayland/meta-wayland-text-input.c
@@ -70,6 +70,8 @@ struct _MetaWaylandTextInput
uint32_t content_type_purpose;
uint32_t text_change_cause;
gboolean enabled;
+
+ guint done_idle_id;
};
struct _MetaWaylandTextInputFocus
@@ -114,6 +116,52 @@ increment_serial (MetaWaylandTextInput *text_input,
GUINT_TO_POINTER (serial + 1));
}
+static gboolean
+done_idle_cb (gpointer user_data)
+{
+ ClutterInputFocus *focus = user_data;
+ MetaWaylandTextInput *text_input;
+ struct wl_resource *resource;
+
+ text_input = META_WAYLAND_TEXT_INPUT_FOCUS (focus)->text_input;
+
+ wl_resource_for_each (resource, &text_input->focus_resource_list)
+ {
+ zwp_text_input_v3_send_done (resource,
+ lookup_serial (text_input, resource));
+ }
+
+ text_input->done_idle_id = 0;
+ return G_SOURCE_REMOVE;
+}
+
+static void
+meta_wayland_text_input_focus_defer_done (ClutterInputFocus *focus)
+{
+ MetaWaylandTextInput *text_input;
+
+ text_input = META_WAYLAND_TEXT_INPUT_FOCUS (focus)->text_input;
+
+ if (text_input->done_idle_id != 0)
+ return;
+
+ /* This operates on 3 principles:
+ * - GDBus uses G_PRIORITY_DEFAULT to put messages in the thread default main
+ * context.
+ * - All relevant ClutterInputFocus methods are ultimately backed by
+ * DBus methods inside IBus.
+ * - We want to run .done after them all. The slightly lower
+ * G_PRIORITY_DEFAULT + 1 priority should ensure we at least group
+ * all messages seen so far.
+ *
+ * FIXME: .done may be delayed indefinitely if there's a high enough
+ * priority idle source in the main loop. It's unlikely that
+ * recurring idles run at this high priority though.
+ */
+ text_input->done_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT + 1,
+ done_idle_cb, focus, NULL);
+}
+
static void
meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
guint cursor,
@@ -127,9 +175,9 @@ meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
wl_resource_for_each (resource, &text_input->focus_resource_list)
{
zwp_text_input_v3_send_delete_surrounding_text (resource, cursor, len);
- zwp_text_input_v3_send_done (resource,
- lookup_serial (text_input, resource));
}
+
+ meta_wayland_text_input_focus_defer_done (focus);
}
static void
@@ -145,9 +193,9 @@ meta_wayland_text_input_focus_commit_text (ClutterInputFocus *focus,
{
zwp_text_input_v3_send_preedit_string (resource, NULL, 0, 0);
zwp_text_input_v3_send_commit_string (resource, text);
- zwp_text_input_v3_send_done (resource,
- lookup_serial (text_input, resource));
}
+
+ meta_wayland_text_input_focus_defer_done (focus);
}
static void
@@ -163,9 +211,9 @@ meta_wayland_text_input_focus_set_preedit_text (ClutterInputFocus *focus,
wl_resource_for_each (resource, &text_input->focus_resource_list)
{
zwp_text_input_v3_send_preedit_string (resource, text, cursor, cursor);
- zwp_text_input_v3_send_done (resource,
- lookup_serial (text_input, resource));
}
+
+ meta_wayland_text_input_focus_defer_done (focus);
}
static void
--
2.19.1

View File

@ -1,38 +0,0 @@
From 49fea735aa6e8ca70927c69c15bc9615d8f0f3b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Tue, 23 Oct 2018 14:13:33 +0200
Subject: [PATCH] wayland/text-input: Ignore text-input state commit when not
focused
We might unset focus, or already be out of focus (e.g. an X11 client or
clutter text entry is focused) when a text-input state is committed by
the client. We handled this before, except when text input was
explicitly disabled by the client, the Wayland text-input was in focus
by the input method, and it focused itself out.
Simplify the logic a bit by just dropping the state on the floor in all
cases where after any potential focus changes were done, we are not
focused.
Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/353
---
src/wayland/meta-wayland-text-input.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/wayland/meta-wayland-text-input.c b/src/wayland/meta-wayland-text-input.c
index 8681430217..5bf06e2e08 100644
--- a/src/wayland/meta-wayland-text-input.c
+++ b/src/wayland/meta-wayland-text-input.c
@@ -503,7 +503,8 @@ text_input_commit_state (struct wl_client *client,
clutter_input_method_focus_out (input_method);
}
}
- else if (!clutter_input_focus_is_focused (focus))
+
+ if (!clutter_input_focus_is_focused (focus))
return;
if (text_input->pending_state & META_WAYLAND_PENDING_STATE_CONTENT_TYPE)
--
2.19.1

View File

@ -0,0 +1,32 @@
From 9efcc35102b4c41265e93461b35a1193b3d5822d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 12 May 2017 13:40:31 +0200
Subject: [PATCH] window-actor: Special-case shaped Java windows
OpenJDK wrongly assumes that shaping a window implies no shadows.
They got lucky until commit b975676c changed the fallback case,
but now their compliance tests are broken. Make them happy again
by special-casing shaped Java windows.
---
src/compositor/meta-window-actor-x11.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
index e4e579e..082ffac 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -549,6 +549,14 @@ has_shadow (MetaWindowActorX11 *actor_x11)
if (window->has_custom_frame_extents)
return FALSE;
+ /*
+ * OpenJDK wrongly assumes that shaping a window implies no compositor
+ * shadows; make its compliance tests happy to give it what it wants ...
+ */
+ if (g_strcmp0 (window->res_name, "sun-awt-X11-XWindowPeer") == 0 &&
+ window->shape_region != NULL)
+ return FALSE;
+
/*
* Generate shadows for all other windows.
*/

View File

@ -1,37 +0,0 @@
From 8200995fdbf04b2763d33cd30d7c8174eebc1736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Sat, 20 Oct 2018 15:47:50 +0200
Subject: [PATCH 2/2] shaped-texture: Clean up texture regions
We allocated texture regions, but didn't free them when finished,
causing a leak.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
---
src/compositor/meta-shaped-texture.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 5328a919ea..cd151a28ed 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -516,6 +516,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
}
else
{
+ opaque_tex_region = NULL;
use_opaque_region = FALSE;
}
@@ -659,6 +660,8 @@ meta_shaped_texture_paint (ClutterActor *actor)
}
}
+ g_clear_pointer (&clip_tex_region, cairo_region_destroy);
+ g_clear_pointer (&opaque_tex_region, cairo_region_destroy);
g_clear_pointer (&blended_tex_region, cairo_region_destroy);
}
--
2.19.1

Binary file not shown.

BIN
mutter-3.38.4.tar.xz Normal file

Binary file not shown.

View File

@ -1,41 +1,33 @@
Name: mutter
Version: 3.30.1
Release: 8
Version: 3.38.4
Release: 1
Summary: Window and compositing manager based on Clutter
License: GPLv2+
URL: https://www.gnome.org
Source0: https://download.gnome.org/sources/%{name}/3.30/%{name}-%{version}.tar.xz
Source0: https://download.gnome.org/sources/%{name}/3.38/%{name}-%{version}.tar.xz
# These patchs are from fedora29
# Fix slow startup notification on wayland
Patch0: startup-notification.patch
# Don't use switch-config when ensuring configuration
Patch1: 0001-monitor-manager-Don-t-use-switch-config-when-ensurin.patch
# Make current placement rule stack allocated
Patch2: 0001-constraints-Make-current-placement-rule-stack-alloca.patch
# Clean up texture regions
Patch3: 0002-shaped-texture-Clean-up-texture-regions.patch
# Defer text_input.done on an idle
Patch4: 0001-wayland-Defer-text_input.done-on-an-idle.patch
# Ignore text-input state commit when not focused
Patch5: 0001-wayland-text-input-Ignore-text-input-state-commit-wh.patch
Patch0: 0001-window-actor-Special-case-shaped-Java-windows.patch
BuildRequires: chrpath pango-devel startup-notification-devel gnome-desktop3-devel glib2-devel gtk3-devel git
BuildRequires: gobject-introspection-devel libSM-devel libwacom-devel libX11-devel libXdamage-devel libXext-devel
BuildRequires: libXfixes-devel libXi-devel libXrandr-devel libXrender-devel libXcursor-devel libXcomposite-devel
BuildRequires: libxcb-devel libxkbcommon-devel libxkbcommon-x11-devel libxkbfile-devel libXtst-devel systemd-devel
BuildRequires: mesa-libEGL-devel libglvnd-devel mesa-libGL-devel mesa-libgbm-devel pam-devel pipewire-devel
BuildRequires: mesa-libEGL-devel libglvnd-devel mesa-libGL-devel mesa-libgbm-devel pam-devel
BuildRequires: upower-devel xkeyboard-config-devel zenity desktop-file-utils gtk-doc gnome-common gettext-devel
BuildRequires: libcanberra-devel gsettings-desktop-schemas-devel automake autoconf libtool json-glib-devel pkgconfig
BuildRequires: libgudev-devel libinput-devel wayland-devel pkgconf-pkg-config libdrm-devel egl-wayland-devel
BuildRequires: mesa-libGLES-devel pkgconfig(graphene-gobject-1.0) pkgconfig(libpipewire-0.3) >= 0.3.0
BuildRequires: pkgconfig(sysprof-capture-4) xorg-x11-server-Xorg zenity gnome-settings-daemon-devel meson
BuildRequires: pkgconfig(wayland-server) pkgconfig(wayland-eglstream) libgudev1-devel xorg-x11-server-Xwayland
Obsoletes: mutter-wayland
Obsoletes: mutter-wayland-devel
Obsoletes: mutter-wayland < 3.13.0
Obsoletes: mutter-wayland-devel < 3.13.0
Conflicts: gnome-shell < 3.21.1
Requires: gnome-control-center-filesystem libinput gsettings-desktop-schemas
Requires: gtk3 pipewire startup-notification dbus-x11 zenity json-glib
Requires: gsettings-desktop-schemas
%description
Mutter is a window and compositing manager based on Clutter, forked
@ -45,7 +37,7 @@ from Metacity.
Summary: Development files and Header files for %{name}
Requires: %{name} = %{version}-%{release}
Provides: %{name}-tests
Obsoletes: %{name}-tests
Obsoletes: %{name}-tests < %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
@ -56,41 +48,41 @@ developing applications that use %{name}.
%autosetup -n %{name}-%{version} -p1
%build
autoreconf -if
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
%configure --enable-compile-warnings=maximum --enable-remote-desktop --enable-installed-tests --with-libwacom --enable-egl-device)
%make_build
%meson -Degl_device=true -Dwayland_eglstream=true -Dxwayland_initfd=disabled
%meson_build
%install
%make_install
%meson_install
%delete_la_and_a
%find_lang %{name}
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%ldconfig_scriptlets
%files
%files -f %{name}.lang
%defattr(-,root,root)
%license COPYING
%{_bindir}/mutter
%{_libdir}/mutter/*
%{_libdir}/libmutter-3.so.*
%{_libdir}/mutter-7/*
%{_libdir}/libmutter-7.so.*
%{_prefix}/libexec/mutter-restart-helper
%{_datadir}/locale/*
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/GConf/gsettings/mutter-schemas.convert
%{_datadir}/gnome-control-center/keybindings/50-mutter*
%{_prefix}/lib/udev/rules.d/61-mutter.rules
%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_includedir}/mutter/*
%{_includedir}/mutter-7/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libmutter-3.so
%{_libdir}/libmutter-7.so
%{_prefix}/libexec/installed-tests/*
%{_datadir}/installed-tests/*
%{_datadir}/mutter/tests/stacking/*.metatest
%{_datadir}/mutter-7/tests/stacking/*.metatest
%files help
%defattr(-,root,root)
@ -98,6 +90,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/*.1.gz
%changelog
* Mon May 31 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.4-1
- Upgrade to 3.38.4
- Update Version, Release, BuildRequires, Obsoletes
- Delete patches which existed in new version, add one patch
- Use meson rebuild. update stage 'install', 'files'
* Wed Aug 5 2020 orange-snn <songnannan2@huawei.com> - 3.30.1-8
- change mesa-libEGL-devel to libglvnd-devel in buildrequires

View File

@ -1,45 +0,0 @@
From 4ed430b4ef3013c96fa56cdc57b925b42d20ead9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 20 Oct 2016 18:00:04 +0200
Subject: [PATCH] gtk-shell: Work around non-working startup notifications
GNOME Shell relies on the MetaScreen::startup-sequence-changed signal,
which is tied to (lib)startup-notification and therefore X11. As a result,
when we remove the startup sequence of a wayland client, GNOME Shell will
not be notified about this until startup-notification's timeout is hit.
As a temporary stop-gap, go through XWayland even for wayland clients,
so that the signal is emitted when expected.
https://bugzilla.gnome.org/show_bug.cgi?id=768531
---
src/wayland/meta-wayland-gtk-shell.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/wayland/meta-wayland-gtk-shell.c b/src/wayland/meta-wayland-gtk-shell.c
index d6e249f..9d1a19e 100644
--- a/src/wayland/meta-wayland-gtk-shell.c
+++ b/src/wayland/meta-wayland-gtk-shell.c
@@ -219,11 +219,21 @@ gtk_shell_set_startup_id (struct wl_client *client,
struct wl_resource *resource,
const char *startup_id)
{
+#if 0
MetaDisplay *display;
display = meta_get_display ();
meta_startup_notification_remove_sequence (display->startup_notification,
startup_id);
+#else
+ /* HACK: MetaScreen::startup-sequence-changed is currently tied to
+ (lib)startup-notification, which means it only works on X11;
+ so for now, always go through XWayland, even for wayland clients */
+ gdk_x11_display_broadcast_startup_message (gdk_display_get_default (),
+ "remove",
+ "ID", startup_id,
+ NULL);
+#endif
}
static void
--
2.9.3