summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2015-10-03 11:02:56 +0200
committerPacho Ramos <pacho@gentoo.org>2015-10-03 11:02:56 +0200
commit2c00b2f8422f0ea593daa6792c3ec6caf83210ef (patch)
treeab16875e75182c1a87640e7623306ef2d4f7f76b /x11-wm/mutter/files/mutter-3.16.3-fallback-keymap.patch
parentdev-libs/npth: arm stable, bug #560272 (diff)
downloadgentoo-2c00b2f8422f0ea593daa6792c3ec6caf83210ef.tar.gz
gentoo-2c00b2f8422f0ea593daa6792c3ec6caf83210ef.tar.bz2
gentoo-2c00b2f8422f0ea593daa6792c3ec6caf83210ef.zip
x11-wm/mutter: Apply some upstream fixes from 3.16 branch and also stop crashing when keymap cannot be get on a first try (from master)
Package-Manager: portage-2.2.22
Diffstat (limited to 'x11-wm/mutter/files/mutter-3.16.3-fallback-keymap.patch')
-rw-r--r--x11-wm/mutter/files/mutter-3.16.3-fallback-keymap.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/x11-wm/mutter/files/mutter-3.16.3-fallback-keymap.patch b/x11-wm/mutter/files/mutter-3.16.3-fallback-keymap.patch
new file mode 100644
index 000000000000..f77234ba3b20
--- /dev/null
+++ b/x11-wm/mutter/files/mutter-3.16.3-fallback-keymap.patch
@@ -0,0 +1,28 @@
+From 9abc0712836c9e56ed08796645874cc0d10b1826 Mon Sep 17 00:00:00 2001
+From: Rui Matos <tiagomatos@gmail.com>
+Date: Mon, 21 Sep 2015 17:25:40 +0200
+Subject: backend-x11: Fallback to a default keymap if getting it from X fails
+
+This shouldn't fail but apparently sometimes it does and in that case
+having a possibly wrong idea of the keymap is still better than
+crashing.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=754979
+
+diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
+index 7ad28fd..dbcd13f 100644
+--- a/src/backends/x11/meta-backend-x11.c
++++ b/src/backends/x11/meta-backend-x11.c
+@@ -760,6 +760,9 @@ meta_backend_x11_get_keymap (MetaBackend *backend)
+ priv->xcb,
+ xkb_x11_get_core_keyboard_device_id (priv->xcb),
+ XKB_KEYMAP_COMPILE_NO_FLAGS);
++ if (priv->keymap == NULL)
++ priv->keymap = xkb_keymap_new_from_names (context, NULL, XKB_KEYMAP_COMPILE_NO_FLAGS);
++
+ xkb_context_unref (context);
+ }
+
+--
+cgit v0.10.2
+