aboutsummaryrefslogtreecommitdiff
path: root/src/arctica-greeter.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r--src/arctica-greeter.vala16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 0355534..94a1eb0 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -580,6 +580,16 @@ public class ArcticaGreeter
greeter_ready ();
}
+ private static void activate_numlock ()
+ {
+ try {
+ Process.spawn_command_line_sync("/usr/bin/numlockx on", null, null, null);
+ }
+ catch (Error e){
+ warning ("Error while activating numlock: %s", e.message);
+ }
+ }
+
public static int main (string[] args)
{
/* Protect memory from being paged to disk, as we deal with passwords */
@@ -641,6 +651,12 @@ public class ArcticaGreeter
if (do_test_mode)
debug ("Running in test mode");
+ /* Set the numlock state */
+ if (AGSettings.get_boolean (AGSettings.KEY_ACTIVATE_NUMLOCK)) {
+ debug ("Activating numlock");
+ activate_numlock ();
+ }
+
Pid atspi_pid = 0;
if (!do_test_mode)
{