update to 3.34.3

This commit is contained in:
h00465007 2020-01-10 14:14:55 +08:00
parent c24d4c425d
commit c0adf9a2b4
9 changed files with 68 additions and 429 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

@ -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.34.3.tar.xz Normal file

Binary file not shown.

View File

@ -1,42 +1,51 @@
%global gtk3_ver 3.19.8
%global glib_ver 2.53.2
%global libinput_ver 1.4
%global mutter_api_ver 5
%global pipewire_ver 0.2.2
%global json_glib_ver 0.12.0
%global gsettings_desktop_schemas_ver 3.33.0
%bcond_with profiler
Name: mutter Name: mutter
Version: 3.30.1 Version: 3.34.3
Release: 7 Release: 1
Summary: Window and compositing manager based on Clutter Summary: Window and compositing manager based on Clutter
License: GPLv2+ License: GPLv2+
URL: https://www.gnome.org URL: https://www.gnome.org
Source0: https://download.gnome.org/sources/%{name}/3.30/%{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
# These patchs are from fedora29 BuildRequires: chrpath pango-devel startup-notification-devel gnome-desktop3-devel
# Fix slow startup notification on wayland BuildRequires: glib2-devel >= %{glib_ver} gtk3-devel >= %{gtk3_ver}
Patch0: startup-notification.patch BuildRequires: gobject-introspection-devel >= 1.41.0 libSM-devel pkgconf-pkg-config
# Don't use switch-config when ensuring configuration BuildRequires: libwacom-devel libX11-devel libXdamage-devel libXext-devel
Patch1: 0001-monitor-manager-Don-t-use-switch-config-when-ensurin.patch BuildRequires: libXfixes-devel libXi-devel libXrandr-devel libXrender-devel
# Make current placement rule stack allocated BuildRequires: libXcursor-devel libXcomposite-devel libxcb-devel libxkbcommon-devel
Patch2: 0001-constraints-Make-current-placement-rule-stack-alloca.patch BuildRequires: libxkbcommon-x11-devel libxkbfile-devel libXtst-devel
# Clean up texture regions BuildRequires: mesa-libEGL-devel mesa-libGLES-devel mesa-libGL-devel
Patch3: 0002-shaped-texture-Clean-up-texture-regions.patch BuildRequires: mesa-libgbm-devel pam-devel pipewire-devel >= %{pipewire_ver}
# Defer text_input.done on an idle BuildRequires: systemd-devel upower-devel xorg-x11-server-Xorg xkeyboard-config-devel
Patch4: 0001-wayland-Defer-text_input.done-on-an-idle.patch BuildRequires: zenity desktop-file-utils automake autoconf libtool
# Ignore text-input state commit when not focused %if %{with profiler}
Patch5: 0001-wayland-text-input-Ignore-text-input-state-commit-wh.patch BuildRequires: sysprof-devel
%endif
BuildRequires: chrpath pango-devel startup-notification-devel gnome-desktop3-devel glib2-devel gtk3-devel git # Bootstrap requirements
BuildRequires: gobject-introspection-devel libSM-devel libwacom-devel libX11-devel libXdamage-devel libXext-devel BuildRequires: gtk-doc gnome-common gettext-devel git libcanberra-devel
BuildRequires: libXfixes-devel libXi-devel libXrandr-devel libXrender-devel libXcursor-devel libXcomposite-devel BuildRequires: gsettings-desktop-schemas-devel >= %{gsettings_desktop_schemas_ver}
BuildRequires: libxcb-devel libxkbcommon-devel libxkbcommon-x11-devel libxkbfile-devel libXtst-devel systemd-devel BuildRequires: gnome-settings-daemon-devel meson libgudev-devel libdrm-devel
BuildRequires: mesa-libEGL-devel mesa-libGLES-devel mesa-libGL-devel mesa-libgbm-devel pam-devel pipewire-devel BuildRequires: libgbm-devel wayland-devel egl-wayland-devel json-glib-devel >= %{json_glib_ver}
BuildRequires: upower-devel xkeyboard-config-devel zenity desktop-file-utils gtk-doc gnome-common gettext-devel BuildRequires: libinput-devel >= %{libinput_ver} xorg-x11-server-Xwayland
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
Obsoletes: mutter-wayland Requires: gnome-control-center-filesystem gtk3 pipewire >= %{pipewire_ver}
Obsoletes: mutter-wayland-devel Requires: gsettings-desktop-schemas >= %{gsettings_desktop_schemas_ver}
Requires: startup-notification dbus zenity json-glib >= %{json_glib_ver}
Requires: libinput >= %{libinput_ver}
Obsoletes: mutter-wayland < 3.13.0 mutter-wayland-devel < 3.13.0
Conflicts: gnome-shell < 3.21.1 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
%description %description
Mutter is a window and compositing manager based on Clutter, forked Mutter is a window and compositing manager based on Clutter, forked
from Metacity. from Metacity.
@ -44,8 +53,9 @@ from Metacity.
%package devel %package devel
Summary: Development files and Header files for %{name} Summary: Development files and Header files for %{name}
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Provides: %{name}-tests Provides: %{name}-tests = %{version}-%{release}
Obsoletes: %{name}-tests Obsoletes: %{name}-tests < %{version}-%{release}
%description devel %description devel
The %{name}-devel package contains libraries and header files for The %{name}-devel package contains libraries and header files for
developing applications that use %{name}. developing applications that use %{name}.
@ -56,48 +66,53 @@ developing applications that use %{name}.
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
%build %build
autoreconf -if %meson -Degl_device=true -Dwayland_eglstream=true \
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi; %if %{with profiler}
%configure --enable-compile-warnings=maximum --enable-remote-desktop --enable-installed-tests --with-libwacom --enable-egl-device) -Dprofiler=true \
%else
-Dprofiler=false \
%endif
%make_build %meson_build
%install %install
%make_install %meson_install
%delete_la_and_a
%find_lang %{name}
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%ldconfig_scriptlets %ldconfig_scriptlets
%files %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
%license COPYING %license COPYING
%{_bindir}/mutter %{_bindir}/mutter
%{_libdir}/mutter/* %{_libdir}/lib*.so.*
%{_libdir}/libmutter-3.so.* %{_libdir}/mutter-%{mutter_api_ver}/
%{_prefix}/libexec/mutter-restart-helper %{_libexecdir}/mutter-restart-helper
%{_datadir}/locale/*
%{_datadir}/applications/*.desktop %{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/GConf/gsettings/mutter-schemas.convert %{_datadir}/GConf/gsettings/mutter-schemas.convert
%{_datadir}/gnome-control-center/keybindings/50-mutter* %{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/gnome-control-center/keybindings/50-mutter-*.xml
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/* %{_includedir}/*
%{_includedir}/mutter/* %{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*
%{_libdir}/libmutter-3.so %{_libexecdir}/installed-tests/mutter-%{mutter_api_ver}
%{_prefix}/libexec/installed-tests/* %{_datadir}/mutter-%{mutter_api_ver}/tests
%{_datadir}/installed-tests/* %{_datadir}/installed-tests/mutter-%{mutter_api_ver}
%{_datadir}/mutter/tests/stacking/*.metatest
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%doc NEWS %doc NEWS
%{_mandir}/man1/*.1.gz %{_mandir}/man1/mutter.1*
%changelog %changelog
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.34.3-1
- update to 3.34.3
* Mon Dec 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.1-7 * Mon Dec 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.1-7
- Type:bugfix - Type:bugfix
- Id:NA - Id:NA
@ -106,4 +121,3 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.1-6 * Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.1-6
- Package init - Package init

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