Accepting request 533691 from GNOME:Factory

(forwarded request 533079 from Zaitor)

OBS-URL: https://build.opensuse.org/request/show/533691
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mutter?expand=0&rev=117
This commit is contained in:
Dominique Leuenberger 2017-10-20 14:12:28 +00:00 committed by Git OBS Bridge
commit 80b15f1547
4 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From edfd15b32daca9fef707a25bf312441349506b05 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Mon, 2 Oct 2017 16:46:17 +0100
Subject: wayland-dma-buf: Don't send modifiers to old clients
The modifier event was only added in v3 of the client; sending it to
older clients (e.g. GStreamer waylandsink) causes them to disconnect
immediately.
Send the older 'format' event to all clients, and only send the newer
'modifier' event to resource versions 3 or above.
https://bugzilla.gnome.org/show_bug.cgi?id=788558
---
src/wayland/meta-wayland-dma-buf.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
index e5d2f7c..76b8aa2 100644
--- a/src/wayland/meta-wayland-dma-buf.c
+++ b/src/wayland/meta-wayland-dma-buf.c
@@ -473,12 +473,19 @@ send_modifiers (struct wl_resource *resource,
gboolean ret;
int i;
+ zwp_linux_dmabuf_v1_send_format (resource, format);
+
+ /* The modifier event was only added in v3; v1 and v2 only have the format
+ * event. */
+ if (wl_resource_get_version (resource) < ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION)
+ return;
+
/* First query the number of available modifiers, then allocate an array,
* then fill the array. */
ret = meta_egl_query_dma_buf_modifiers (egl, egl_display, format, 0, NULL,
NULL, &num_modifiers, NULL);
if (!ret || num_modifiers == 0)
- return;
+ return;
modifiers = g_new0 (uint64_t, num_modifiers);
ret = meta_egl_query_dma_buf_modifiers (egl, egl_display, format,
--
cgit v0.12

View File

@ -0,0 +1,34 @@
From 41f7a5fdf3bd95bd13e43e2151d29157d1dc5168 Mon Sep 17 00:00:00 2001
From: polygamma <jonny.westphalen@googlemail.com>
Date: Mon, 9 Oct 2017 16:14:13 +0200
Subject: x11: Protect XChangeProperty call with error traps
They may happen around the time a window is destroyed, thus could result
on BadWindow X errors.
https://bugzilla.gnome.org/show_bug.cgi?id=788666
---
src/x11/window-x11.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 36a5e70..4885f5f 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -920,11 +920,13 @@ update_gtk_edge_constraints (MetaWindow *window)
meta_verbose ("Setting _GTK_EDGE_CONSTRAINTS to %lu\n", data[0]);
+ meta_error_trap_push (window->display);
XChangeProperty (window->display->xdisplay,
window->xwindow,
window->display->atom__GTK_EDGE_CONSTRAINTS,
XA_CARDINAL, 32, PropModeReplace,
(guchar*) data, 1);
+ meta_error_trap_pop (window->display);
}
static gboolean
--
cgit v0.12

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 10 13:03:00 UTC 2017 - zaitor@opensuse.org
- Add mutter-wayland-dma-buf-modifiers-fix.patch: Don't send
modifiers to old clients (bgo#788558).
- Add mutter-x11-Protect-XChangeProperty-call.patch: Protect
XChangeProperty call with error traps (bgo#788666).
-------------------------------------------------------------------
Wed Oct 4 19:55:42 UTC 2017 - zaitor@opensuse.org

View File

@ -28,6 +28,10 @@ Source: http://download.gnome.org/sources/mutter/3.26/%{name}-%{version}
Patch0: mutter-fix-startup.patch
# PATCH-FEATURE-UPSTREAM mutter-iconcache-Support-RGB16_565-format-for-16-bit-color-.patch FATE#323412 bgo#781704 bsc#1024748 vliaskovitis@suse.com -- iconcache: Support RGB16_565 format for 16-bit sessions
Patch1: mutter-iconcache-Support-RGB16_565-format-for-16-bit-color-.patch
# PATCH-FIX-UPSTREAM mutter-wayland-dma-buf-modifiers-fix.patch bgo#788558 zaitor@opensuse.org -- Don't send modifiers to old clients
Patch2: mutter-wayland-dma-buf-modifiers-fix.patch
# PATCH-FIX-UPSTREAM mutter-x11-Protect-XChangeProperty-call.patch bgo#788666 zaitor@opensuse.org -- Protect XChangeProperty call with error traps
Patch3: mutter-x11-Protect-XChangeProperty-call.patch
# SLE only patches start at 1000
# PATCH-FEATURE-SLE mutter-SLE-bell.patch FATE#316042 bnc#889218 idonmez@suse.com -- make audible bell work out of the box.
@ -138,6 +142,8 @@ applications that want to make use of the mutter library.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# SLE only patches and translations.
%if !0%{?is_opensuse}