Upgrade to 47.5

This also contains two additional patches backported from the gnome-47
branch.

Related: RHEL-74562
This commit is contained in:
Jonas Ådahl 2025-02-12 16:21:13 +08:00
parent e49eb04725
commit d6c812eb3b
5 changed files with 129 additions and 2 deletions

1
.gitignore vendored
View File

@ -226,3 +226,4 @@ mutter-2.31.5.tar.bz2
/mutter-47.rc.tar.xz /mutter-47.rc.tar.xz
/mutter-47.0.tar.xz /mutter-47.0.tar.xz
/mutter-47.4.tar.xz /mutter-47.4.tar.xz
/mutter-47.5.tar.xz

View File

@ -0,0 +1,81 @@
From cadb4cdbb15a58cc38cc15cfe1ad457ffda7d7a0 Mon Sep 17 00:00:00 2001
From: Dudemanguy <random342@airmail.cc>
Date: Thu, 6 Feb 2025 08:21:16 -0600
Subject: [PATCH 1/2] wayland: Fix refresh interval reporting in
presentation-time version 1
Version 1 of the presentation protocol requires that 0 be sent for the
refresh rate for variable refresh rate. Fix this by checking the mode
during the presentation event.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4227>
---
src/wayland/meta-wayland-outputs.c | 6 ++++++
src/wayland/meta-wayland-outputs.h | 2 ++
src/wayland/meta-wayland-presentation-time.c | 13 ++++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
index d860ac91f7..1c09f6f101 100644
--- a/src/wayland/meta-wayland-outputs.c
+++ b/src/wayland/meta-wayland-outputs.c
@@ -92,6 +92,12 @@ meta_wayland_output_get_monitor (MetaWaylandOutput *wayland_output)
return wayland_output->monitor;
}
+MetaMonitorMode *
+meta_wayland_output_get_monitor_mode (MetaWaylandOutput *wayland_output)
+{
+ return wayland_output->mode;
+}
+
static void
output_resource_destroy (struct wl_resource *res)
{
diff --git a/src/wayland/meta-wayland-outputs.h b/src/wayland/meta-wayland-outputs.h
index f28b591220..d27948d153 100644
--- a/src/wayland/meta-wayland-outputs.h
+++ b/src/wayland/meta-wayland-outputs.h
@@ -33,6 +33,8 @@ const GList * meta_wayland_output_get_resources (MetaWaylandOutput *wayland_outp
MetaMonitor * meta_wayland_output_get_monitor (MetaWaylandOutput *wayland_output);
+MetaMonitorMode * meta_wayland_output_get_monitor_mode (MetaWaylandOutput *wayland_output);
+
void meta_wayland_outputs_finalize (MetaWaylandCompositor *compositor);
void meta_wayland_outputs_init (MetaWaylandCompositor *compositor);
diff --git a/src/wayland/meta-wayland-presentation-time.c b/src/wayland/meta-wayland-presentation-time.c
index abddb63b12..13a98a984b 100644
--- a/src/wayland/meta-wayland-presentation-time.c
+++ b/src/wayland/meta-wayland-presentation-time.c
@@ -323,6 +323,8 @@ meta_wayland_presentation_feedback_present (MetaWaylandPresentationFeedback *fee
uint32_t seq_hi, seq_lo;
uint32_t flags;
const GList *l;
+ MetaMonitorMode *mode;
+ gboolean is_vrr;
if (output == NULL)
{
@@ -337,7 +339,16 @@ meta_wayland_presentation_feedback_present (MetaWaylandPresentationFeedback *fee
tv_sec_lo = time_s;
tv_nsec = (uint32_t) us2ns (time_us - s2us (time_s));
- refresh_interval_ns = (uint32_t) (0.5 + s2ns (1) / frame_info->refresh_rate);
+ mode = meta_wayland_output_get_monitor_mode (output);
+
+ is_vrr = meta_monitor_mode_get_refresh_rate_mode (mode) ==
+ META_CRTC_REFRESH_RATE_MODE_VARIABLE;
+
+ /* The refresh rate interval is required to be 0 for vrr. */
+ if (is_vrr)
+ refresh_interval_ns = 0;
+ else
+ refresh_interval_ns = (uint32_t) (0.5 + s2ns (1) / frame_info->refresh_rate);
maybe_update_presentation_sequence (surface, frame_info, output);
--
2.44.0.501.g19981daefd.dirty

View File

@ -0,0 +1,41 @@
From 05c722d66dda0c55d3c58ccf5c7c321445664a45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Wed, 12 Feb 2025 07:52:14 +0000
Subject: [PATCH 2/2] input-capture/session: Disconnect on_keymap_changed on
session finalize
When Input Capture was enabled on Input Leap server startup and then
finalized when Input Leap server was stopped, switching keymap was
still triggering its on_keymap_changed callback, but on a freed session
thus triggering use after free a segfault.
Fixes: 2fb3bdf77 - input-capture: Hook up capturing of events to active session
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3360
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4257>
(cherry picked from commit 99dbcf1b8caba93acb5479d1c7ad754ff3fd0540)
Co-authored-by: Alban Browaeys <alban.browaeys@gmail.com>
---
src/backends/meta-input-capture-session.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/backends/meta-input-capture-session.c b/src/backends/meta-input-capture-session.c
index 14973e3e75..4f9d854273 100644
--- a/src/backends/meta-input-capture-session.c
+++ b/src/backends/meta-input-capture-session.c
@@ -1188,6 +1188,10 @@ static void
meta_input_capture_session_finalize (GObject *object)
{
MetaInputCaptureSession *session = META_INPUT_CAPTURE_SESSION (object);
+ MetaBackend *backend =
+ meta_dbus_session_manager_get_backend (session->session_manager);
+
+ g_signal_handlers_disconnect_by_func (backend, on_keymap_changed, session);
g_clear_pointer (&session->barriers, g_hash_table_unref);
--
2.44.0.501.g19981daefd.dirty

View File

@ -12,7 +12,7 @@
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
Name: mutter Name: mutter
Version: 47.4 Version: 47.5
Release: %autorelease Release: %autorelease
Summary: Window and compositing manager based on Clutter Summary: Window and compositing manager based on Clutter
@ -45,6 +45,10 @@ Patch: 0001-cursor-renderer-native-Pass-destination-format-to-sc.patch
Patch: 0002-cursor-renderer-native-Store-formats-in-MetaCursorRe.patch Patch: 0002-cursor-renderer-native-Store-formats-in-MetaCursorRe.patch
Patch: 0003-cursor-renderer-native-Probe-formats-supported-by-cu.patch Patch: 0003-cursor-renderer-native-Probe-formats-supported-by-cu.patch
# Backports from gnome-47 branch between 47.5 and 47.6
Patch: 0001-wayland-Fix-refresh-interval-reporting-in-presentati.patch
Patch: 0002-input-capture-session-Disconnect-on_keymap_changed-o.patch
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0 BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0
BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(libwacom) BuildRequires: pkgconfig(libwacom)

View File

@ -1 +1 @@
SHA512 (mutter-47.4.tar.xz) = f1d3c16830a5fd8225f62d37f583931d582ed1d09631b1d44321a162c14b4d99b2487f322a4c95954b154cdc205b0d20d5d12663f89675baff211e49067ef1ee SHA512 (mutter-47.5.tar.xz) = a0faade5f29a8ab4f43ecf806e2187a0683bd076ff6296f0bec13ef891f5112eefece2b29302336314da7f4b2748deca0d3b0b5ec8cc761bce7daf87dc089c01