Update to 43.rc

This commit is contained in:
Florian Müllner 2022-09-04 16:43:05 +02:00
parent db887dd10b
commit 39162bdd1a
8 changed files with 13 additions and 290 deletions

1
.gitignore vendored
View File

@ -199,3 +199,4 @@ mutter-2.31.5.tar.bz2
/mutter-42.2.tar.xz /mutter-42.2.tar.xz
/mutter-43.alpha.tar.xz /mutter-43.alpha.tar.xz
/mutter-43.beta.tar.xz /mutter-43.beta.tar.xz
/mutter-43.rc.tar.xz

View File

@ -1,27 +0,0 @@
From b0607154668f9f3e8a5959470a1fc7f601e66b77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 10 Aug 2022 20:13:24 +0200
Subject: [PATCH] build: Add missing include
util-private.h includes glib-i18n-lib.h, which requires GETTEXT_PACKAGE
to be defined. The define comes from config.h,
but that cannot be included in headers, so we have to make sure
that any source file that pulls in util-private.h (or a header
that includes it) includes config.h first.
---
src/meta-private-enum-types.c.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/meta-private-enum-types.c.in b/src/meta-private-enum-types.c.in
index c2479a91a..55cd855ca 100644
--- a/src/meta-private-enum-types.c.in
+++ b/src/meta-private-enum-types.c.in
@@ -1,4 +1,5 @@
/*** BEGIN file-header ***/
+#include "config.h"
#include "meta-private-enum-types.h"
/*** END file-header ***/
--
2.36.1

View File

@ -1,137 +0,0 @@
From 51064c1b4e46be180d4aa9b3fcfd57a6ea7ea615 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Fri, 19 Aug 2022 17:08:42 +0200
Subject: [PATCH 1/3] wayland: Ensure to unlink destroy listeners after
destruction
This is missed in some wl_listeners added
through wl_resource_add_destroy_listener(). Ensure this is done consistently
for all notify functions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2588>
---
src/wayland/meta-wayland-data-device.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index c8cf8f5c4b..d6c28ff331 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -173,11 +173,13 @@ unset_selection_source (MetaWaylandDataDevice *data_device,
}
static void
-destroy_drag_focus (struct wl_listener *listener, void *data)
+destroy_drag_focus (struct wl_listener *listener,
+ void *data)
{
MetaWaylandDragGrab *grab = wl_container_of (listener, grab, drag_focus_listener);
grab->drag_focus_data_device = NULL;
+ wl_list_remove (&grab->drag_focus_listener.link);
g_clear_signal_handler (&grab->drag_focus_destroy_handler_id,
grab->drag_focus);
@@ -560,12 +562,14 @@ drag_grab_data_source_destroyed (gpointer data, GObject *where_the_object_was)
}
static void
-destroy_data_device_icon (struct wl_listener *listener, void *data)
+destroy_data_device_icon (struct wl_listener *listener,
+ void *data)
{
MetaWaylandDragGrab *drag_grab =
wl_container_of (listener, drag_grab, drag_icon_listener);
drag_grab->drag_surface = NULL;
+ wl_list_remove (&drag_grab->drag_icon_listener.link);
if (drag_grab->feedback_actor)
clutter_actor_remove_all_children (drag_grab->feedback_actor);
--
GitLab
From f4f39d3a2cd2de35e1f85e32182a34336d52ae3d Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Fri, 19 Aug 2022 17:10:15 +0200
Subject: [PATCH 2/3] wayland: Ensure to unlink destroy listeners for
subsurfaces
There is some surface tracking going on here, and all notify handlers
are possibly leaving the linked wl_listener behind. Ensure it is unlinked
in all destroy notification functions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2588>
---
src/wayland/meta-wayland-subsurface.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c
index 3e088b04fb..6a23c86100 100644
--- a/src/wayland/meta-wayland-subsurface.c
+++ b/src/wayland/meta-wayland-subsurface.c
@@ -342,6 +342,7 @@ subsurface_handle_pending_subsurface_destroyed (struct wl_listener *listener,
wl_container_of (listener, op, subsurface_destroy_listener);
op->surface = NULL;
+ wl_list_remove (&op->subsurface_destroy_listener.link);
}
static void
@@ -352,6 +353,7 @@ subsurface_handle_pending_sibling_destroyed (struct wl_listener *listener,
wl_container_of (listener, op, sibling_destroy_listener);
op->sibling = NULL;
+ wl_list_remove (&op->sibling_destroy_listener.link);
}
void
@@ -487,6 +489,7 @@ surface_handle_parent_surface_destroyed (struct wl_listener *listener,
g_node_unlink (surface->subsurface_branch_node);
surface->sub.parent = NULL;
+ wl_list_remove (&surface->sub.parent_destroy_listener.link);
}
static gboolean
--
GitLab
From 9c402bd091255e8a21f7e3263559dbe63135dec7 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Fri, 19 Aug 2022 17:13:01 +0200
Subject: [PATCH 3/3] wayland: Ensure to remove destroy listener for
MetaWaylandBuffer
Avoid the chance of invalid memory access by leaving the wl_listener
behind when handling the destroy notification.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2588>
---
src/wayland/meta-wayland-buffer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/wayland/meta-wayland-buffer.c b/src/wayland/meta-wayland-buffer.c
index 557952b6fe..7a22f824bc 100644
--- a/src/wayland/meta-wayland-buffer.c
+++ b/src/wayland/meta-wayland-buffer.c
@@ -83,12 +83,13 @@ G_DEFINE_TYPE (MetaWaylandBuffer, meta_wayland_buffer, G_TYPE_OBJECT);
static void
meta_wayland_buffer_destroy_handler (struct wl_listener *listener,
- void *data)
+ void *data)
{
MetaWaylandBuffer *buffer =
wl_container_of (listener, buffer, destroy_listener);
buffer->resource = NULL;
+ wl_list_remove (&buffer->destroy_listener.link);
g_signal_emit (buffer, signals[RESOURCE_DESTROYED], 0);
g_object_unref (buffer);
}
--
GitLab

View File

@ -1,76 +0,0 @@
From ed516dde899f87b19f3dd0ed4613b692f778d437 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 23 Aug 2022 21:56:02 +0200
Subject: [PATCH] wayland: Add destruction listener to activation token surface
In the timespan between an activation token being created and the
token being used by the activated application, the surface that started
the activation request may end up destroyed/disposed.
In that case, the token would be left with a stale surface pointer,
maybe causing crashes later on. Set up a destroy notification listener
so that we do know to unset the token surface if that situation arises,
this will result in Mutter not considering the token activatable, thus
maybe issuing the "Application needs attention" notification if the
activated surface did not immediately get focus. In any case this is
better than a compositor crash.
A typical situation where this may happen is "Open With..." dialogs,
since those don't live long after launching the application.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2390
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2592>
---
src/wayland/meta-wayland-activation.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/wayland/meta-wayland-activation.c b/src/wayland/meta-wayland-activation.c
index 73faa19142..b7035ab5ce 100644
--- a/src/wayland/meta-wayland-activation.c
+++ b/src/wayland/meta-wayland-activation.c
@@ -47,6 +47,7 @@ struct _MetaXdgActivationToken
MetaWaylandSeat *seat;
MetaWaylandActivation *activation;
MetaStartupSequence *sequence;
+ struct wl_listener surface_listener;
char *app_id;
char *token;
uint32_t serial;
@@ -94,6 +95,8 @@ token_set_surface (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource);
token->surface = surface;
+ wl_resource_add_destroy_listener (surface_resource,
+ &token->surface_listener);
}
static void
@@ -216,6 +219,17 @@ meta_xdg_activation_token_free (MetaXdgActivationToken *token)
g_free (token);
}
+static void
+token_handle_surface_destroy (struct wl_listener *listener,
+ void *data)
+{
+ MetaXdgActivationToken *token = wl_container_of (listener, token,
+ surface_listener);
+
+ token->surface = NULL;
+ wl_list_remove (&token->surface_listener.link);
+}
+
static void
meta_wayland_activation_token_create_new_resource (MetaWaylandActivation *activation,
struct wl_client *client,
@@ -237,6 +251,7 @@ meta_wayland_activation_token_create_new_resource (MetaWaylandActivation *activa
wl_resource_set_user_data (token_resource, token);
wl_list_insert (&activation->token_list,
wl_resource_get_link (token_resource));
+ token->surface_listener.notify = token_handle_surface_destroy;
}
static void
--
GitLab

View File

@ -1,31 +0,0 @@
From 9d558e334cb74a09932e7ea8013c7e1babb1b215 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 25 Aug 2022 11:07:53 +0200
Subject: [PATCH] wayland: Unlink surface listener when freeing token
If the token ended up consumed and freed, we might leave a dangling
destroy listener after freeing the token struct.
Fixes: ed516dde89 (wayland: Add destruction listener to activation token surface)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2594>
---
src/wayland/meta-wayland-activation.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/wayland/meta-wayland-activation.c b/src/wayland/meta-wayland-activation.c
index b7035ab5ce..db1f2b10d8 100644
--- a/src/wayland/meta-wayland-activation.c
+++ b/src/wayland/meta-wayland-activation.c
@@ -214,6 +214,9 @@ meta_xdg_activation_token_free (MetaXdgActivationToken *token)
g_clear_object (&token->sequence);
}
+ if (token->surface)
+ wl_list_remove (&token->surface_listener.link);
+
g_free (token->app_id);
g_free (token->token);
g_free (token);
--
GitLab

View File

@ -12,10 +12,10 @@ diff --git a/src/backends/native/meta-kms-impl-device-atomic.c b/src/backends/na
index bcb41e8ad..bafbc7b8f 100644 index bcb41e8ad..bafbc7b8f 100644
--- a/src/backends/native/meta-kms-impl-device-atomic.c --- a/src/backends/native/meta-kms-impl-device-atomic.c
+++ b/src/backends/native/meta-kms-impl-device-atomic.c +++ b/src/backends/native/meta-kms-impl-device-atomic.c
@@ -1159,6 +1159,7 @@ is_atomic_allowed (const char *driver_name) @@ -1216,6 +1216,7 @@ is_atomic_allowed (const char *driver_name)
"vboxvideo", "vboxvideo",
"nvidia-drm",
"virtio_gpu", "virtio_gpu",
"xlnx",
+ "tegra", + "tegra",
NULL, NULL,
}; };

View File

@ -4,13 +4,15 @@
%global json_glib_version 0.12.0 %global json_glib_version 0.12.0
%global libinput_version 1.19.0 %global libinput_version 1.19.0
%global pipewire_version 0.3.33 %global pipewire_version 0.3.33
%global lcms2_version 2.6
%global colord_version 1.4.5
%global mutter_api_version 11 %global mutter_api_version 11
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
Name: mutter Name: mutter
Version: 43~beta Version: 43~rc
Release: 4%{?dist} Release: 1%{?dist}
Summary: Window and compositing manager based on Clutter Summary: Window and compositing manager based on Clutter
License: GPLv2+ License: GPLv2+
@ -26,20 +28,6 @@ Patch1: 0001-Revert-build-Do-not-provide-built-sources-as-libmutt.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1936991 # https://bugzilla.redhat.com/show_bug.cgi?id=1936991
Patch2: mutter-42.alpha-disable-tegra.patch Patch2: mutter-42.alpha-disable-tegra.patch
Patch3: 0001-build-Add-missing-include.patch
# Backported from upstream
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2592
Patch4: 2592.patch
# Backported from upstream
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2588
Patch5: 2588.patch
# Backported from upstream
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2594
Patch6: 2594.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)
@ -87,6 +75,8 @@ BuildRequires: pkgconfig(libstartup-notification-1.0)
BuildRequires: pkgconfig(wayland-eglstream) BuildRequires: pkgconfig(wayland-eglstream)
BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-protocols)
BuildRequires: pkgconfig(wayland-server) BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(lcms2) >= %{lcms2_version}
BuildRequires: pkgconfig(colord) >= %{colord_version}
BuildRequires: pkgconfig(json-glib-1.0) >= %{json_glib_version} BuildRequires: pkgconfig(json-glib-1.0) >= %{json_glib_version}
BuildRequires: pkgconfig(libinput) >= %{libinput_version} BuildRequires: pkgconfig(libinput) >= %{libinput_version}
@ -183,6 +173,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests %{_datadir}/mutter-%{mutter_api_version}/tests
%changelog %changelog
* Sun Sep 04 2022 Florian Müllner <fmuellner@redhat.com> - 43~rc-1
- Update to 43.rc
* Thu Aug 25 2022 Kalev Lember <klember@redhat.com> - 43~beta-4 * Thu Aug 25 2022 Kalev Lember <klember@redhat.com> - 43~beta-4
- wayland: Unlink surface listener when freeing token - wayland: Unlink surface listener when freeing token

View File

@ -1 +1 @@
SHA512 (mutter-43.beta.tar.xz) = 027629387a17ddd84814aa385f9b0be2befe2d0c9b2d514ecefdb78d11c2d6dda86bdd1ac7d93c5c1beb61a8284c7b7813f93bd13df7c71a80cb872ebb2ba397 SHA512 (mutter-43.rc.tar.xz) = b1f9971a3d62c4dc1cb3ddd67f6e2a3cdca04a4897400424debdf9ba270fe31c0c897c2932460e55dd22d7c2f1df744e6c6f69f8888f817ed23a64fe804b1bba