From 371cda4940a8586fa9c00c13efa6fb3c091fd9f6 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 3 Oct 2018 13:41:00 -0700 Subject: [PATCH] Backport fix for #1630943 from upstream master --- ...utput-events-without-a-logical-monit.patch | 43 +++++++++++++++++++ mutter.spec | 8 +++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0001-wayland-No-xdg-output-events-without-a-logical-monit.patch diff --git a/0001-wayland-No-xdg-output-events-without-a-logical-monit.patch b/0001-wayland-No-xdg-output-events-without-a-logical-monit.patch new file mode 100644 index 0000000..75f4976 --- /dev/null +++ b/0001-wayland-No-xdg-output-events-without-a-logical-monit.patch @@ -0,0 +1,43 @@ +From 68ec9ac017157def9b7c25dd8141dc0e93d9f918 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Tue, 25 Sep 2018 13:50:09 +0200 +Subject: [PATCH] wayland: No xdg-output events without a logical monitor + +To avoid a known race condition in the wl_output protocol documented in +https://phabricator.freedesktop.org/T7722, mutter delays the `wl_output` +destruction but nullify the `logical_monitor` associated with the +`wl_output` and the binding routine `bind_output()` makes sure not to +send wl_output events if the `logical_monitor` is `NULL` (see commit +1923db97). + +The binding routine for `xdg_output` however does not check for such a +condition, hence if the output configuration changes while a client is +binding to xdg-output (typically Xwayland at startup), mutter would +crash while trying to access the `logical_monitor` which was nullified +by the change in configuration. + +Just like `bind_output()` does for wl_output, do not send xdg-output +events if there is no `logical_monitor` yet. + +Closes: https://gitlab.gnome.org/GNOME/mutter/issues/194 +--- + src/wayland/meta-wayland-outputs.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c +index 544ce341d..bd0a3b1ff 100644 +--- a/src/wayland/meta-wayland-outputs.c ++++ b/src/wayland/meta-wayland-outputs.c +@@ -591,6 +591,9 @@ meta_xdg_output_manager_get_xdg_output (struct wl_client *client, + wayland_output->xdg_output_resources = + g_list_prepend (wayland_output->xdg_output_resources, xdg_output_resource); + ++ if (!wayland_output->logical_monitor) ++ return; ++ + send_xdg_output_events (xdg_output_resource, + wayland_output, + wayland_output->logical_monitor, +-- +2.19.0 + diff --git a/mutter.spec b/mutter.spec index 1eb3b24..a6d4951 100644 --- a/mutter.spec +++ b/mutter.spec @@ -7,7 +7,7 @@ Name: mutter Version: 3.30.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -16,6 +16,9 @@ URL: http://www.gnome.org Source0: http://download.gnome.org/sources/%{name}/3.30/%{name}-%{version}.tar.xz Patch0: startup-notification.patch +# Backport of https://gitlab.gnome.org/GNOME/mutter/commit/68ec9ac017157def9b7c25dd8141dc0e93d9f918 +# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1630943 +Patch1: 0001-wayland-No-xdg-output-events-without-a-logical-monit.patch BuildRequires: chrpath BuildRequires: pango-devel @@ -181,6 +184,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter/tests %changelog +* Wed Oct 03 2018 Adam Williamson - 3.30.0-3 +- Backport fix for #1630943 from upstream master + * Thu Sep 06 2018 Mateusz MikuĊ‚a - 3.30.0-2 - Enable EGLDevice support