diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-26 14:30:54 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-26 14:33:21 +0200 |
commit | 164a06e66ee8197fd8bf3201591ab590956888da (patch) | |
tree | 27cb6cccb773606b15f8c8028e6ddc06988fe8d7 /src/arctica-greeter.vala | |
parent | f192e262ea6d9905d29cf9ad8b0e76f463f9f475 (diff) | |
download | arctica-greeter-164a06e66ee8197fd8bf3201591ab590956888da.tar.gz arctica-greeter-164a06e66ee8197fd8bf3201591ab590956888da.tar.bz2 arctica-greeter-164a06e66ee8197fd8bf3201591ab590956888da.zip |
Explicitly set the keyboard layout
Ported from slick-greeter:
Author: Clement Lefebvre <clement.lefebvre@linuxmint.com>
Date: Sat Jun 10 15:57:49 2017 +0100
Explicitly set the keyboard layout
The keyboard layout isn't properly set by default in some case.
This affects wireless Logitech keyboards in particular, and it results
in the greeter using an American layout instead of the layout chosen
during the installation.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r-- | src/arctica-greeter.vala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 94a1eb0..2def301 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -580,6 +580,16 @@ public class ArcticaGreeter greeter_ready (); } + private static void set_keyboard_layout () + { + try { + Process.spawn_command_line_sync(Path.build_filename (Config.PKGLIBEXECDIR, "arctica-greeter-set-keyboard-layout"), null, null, null); + } + catch (Error e){ + warning ("Error while setting the keyboard layout: %s", e.message); + } + } + private static void activate_numlock () { try { @@ -651,6 +661,9 @@ public class ArcticaGreeter if (do_test_mode) debug ("Running in test mode"); + /* Set the keyboard layout */ + set_keyboard_layout (); + /* Set the numlock state */ if (AGSettings.get_boolean (AGSettings.KEY_ACTIVATE_NUMLOCK)) { debug ("Activating numlock"); |