x11-wm/mutter: Fix non-wayland build (#667244 by Denis Descheneaux)
authorPacho Ramos <pacho@gentoo.org>
Sun, 30 Sep 2018 20:09:25 +0000 (22:09 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 30 Sep 2018 20:10:14 +0000 (22:10 +0200)
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11

x11-wm/mutter/files/3.26.2-non-wayland-build.patch [new file with mode: 0644]
x11-wm/mutter/mutter-3.26.2-r1.ebuild

diff --git a/x11-wm/mutter/files/3.26.2-non-wayland-build.patch b/x11-wm/mutter/files/3.26.2-non-wayland-build.patch
new file mode 100644 (file)
index 0000000..a2a8d35
--- /dev/null
@@ -0,0 +1,33 @@
+From 6cc48d8cbbf11fa82ec78cac0b29d52f05eabb60 Mon Sep 17 00:00:00 2001
+From: Ting-Wei Lan <lantw@src.gnome.org>
+Date: Sun, 24 Dec 2017 17:55:14 +0800
+Subject: [PATCH] build: Fix non-wayland builds
+
+meta_dnd_wayland_handle_end_modal is not available on non-wayland build.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=791916
+---
+ src/compositor/compositor.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
+index 51d22bc17..aa49347c9 100644
+--- a/src/compositor/compositor.c
++++ b/src/compositor/compositor.c
+@@ -419,11 +419,13 @@ meta_end_modal_for_plugin (MetaCompositor *compositor,
+   meta_backend_ungrab_device (backend, META_VIRTUAL_CORE_POINTER_ID, timestamp);
+   meta_backend_ungrab_device (backend, META_VIRTUAL_CORE_KEYBOARD_ID, timestamp);
++#ifdef HAVE_WAYLAND
+   if (meta_is_wayland_compositor ())
+     {
+       meta_dnd_wayland_handle_end_modal (compositor);
+       meta_display_sync_wayland_input_focus (display);
+     }
++#endif
+ }
+ static void
+-- 
+2.18.0
+
index 71a77b24829487c038fb73bfa6c537d51b9f314c..209182f780be88fb1d2c6913eeb3872de76129c1 100644 (file)
@@ -81,6 +81,9 @@ DEPEND="${RDEPEND}
 PATCHES=(
        # Lots of patches from gnome-3-26 branch on top of 3.26.2
        "${WORKDIR}"/patches/
+
+       # Fix non-wayland builds, bug #667244
+       "${FILESDIR}"/${PV}-non-wayland-build.patch
 )
 
 src_prepare() {