1
0
gnome-settings-daemon/gnome-settings-daemon-initial-keyboard.patch
Dominique Leuenberger f3f44f9994 Accepting request 417855 from home:mgorse:branches:GNOME:Factory
Synch with SLE.

Forgot to actually remove the old patch (oops!) It's really gone this time.
- Only require udev on SLE. Only needed for older filesystem
  package.
- Re-enable gnome-patch-translation on SLE. We don't have any
  non-rebased patches now, so probably safe.
- Drop gnome-settings-daemon-housekeeping-ignore-boot-efi.patch:
  now handled in branding.

- Add gnome-settings-daemon-housekeeping-ignore-boot-efi.patch
  (bsc#919217). Prevent popup warnings about /boot/efi on a default
  UEFI installation.

- Remove gnome-settings-daemon-bnc877552.patch - fixed upstream

- Added back an updated version of
  gnome-settings-daemon-initial-keyboard.patch for bsc#979051. 
  Suse works differently from GNOME; we set the default keyboard
  from xkb, and GNOME likes to do it itself.  This makes sure
  there is no keyboard selector icon if there is a single default
  keyboard defined.

- Removed
  gsettings-do-not-store-autodetected-keyboard-settings.patch.
  Equivalent code is now upstream.

- Removed gnome-settings-daemon-initial-keyboard.patch.  Upstream's
  behavior is fine, as the default keyboard layout needs to be
  available for the screen lock.

- Update to GNOME 3.20.1  Fate#318572
- Rebased gnome-settings-daemon-notify-idle-resumed.patch.

OBS-URL: https://build.opensuse.org/request/show/417855
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=248
2016-08-12 09:42:58 +00:00

68 lines
2.8 KiB
Diff

From c2e0c03c03f47da9b117db0ba876732e84dcf0c4 Mon Sep 17 00:00:00 2001
From: Federico Mena Quintero <federico@gnome.org>
Date: Mon, 16 May 2016 19:18:43 -0500
Subject: [PATCH] Resurrect the code from upstream to set the default keyboard
from XKB if there is one.
Suse works differently than GNOME here; we set a default keyboard from
the system's configuration instead of letting GNOME take care of
everything itself.
https://bugzilla.suse.com/show_bug.cgi?id=979051
---
plugins/keyboard/gsd-keyboard-manager.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index eb75c92..06be608 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -450,7 +450,7 @@ input_sources_changed (GSettings *settings,
}
static void
-get_sources_from_xkb_config (GsdKeyboardManager *manager)
+get_sources_from_xkb_config (GsdKeyboardManager *manager, gboolean running_under_gdm)
{
GsdKeyboardManagerPrivate *priv = manager->priv;
GVariantBuilder builder;
@@ -501,7 +501,7 @@ get_sources_from_xkb_config (GsdKeyboardManager *manager)
g_free (id);
}
- if (!have_default_layout)
+ if (!have_default_layout && running_under_gdm)
g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, DEFAULT_LAYOUT);
g_settings_set_value (priv->input_sources_settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
@@ -653,15 +653,23 @@ maybe_create_initial_settings (GsdKeyboardManager *manager)
settings = manager->priv->input_sources_settings;
- if (g_getenv ("RUNNING_UNDER_GDM"))
- return;
+ if (g_getenv ("RUNNING_UNDER_GDM")) {
+ GVariantBuilder builder;
+ /* clean the settings and get them from the "system" */
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)"));
+ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
+ get_sources_from_xkb_config (manager, TRUE);
+
+ g_settings_set_strv (settings, KEY_KEYBOARD_OPTIONS, NULL);
+ get_options_from_xkb_config (manager);
+ }
maybe_convert_old_settings (settings);
/* if we still don't have anything do some educated guesses */
sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
if (g_variant_n_children (sources) < 1)
- get_sources_from_xkb_config (manager);
+ get_sources_from_xkb_config (manager, FALSE);
g_variant_unref (sources);
options = g_settings_get_strv (settings, KEY_KEYBOARD_OPTIONS);
--
2.1.4