Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=4bf9a3656d0cb65becb9870251fedf194b83c92b

commit 4bf9a3656d0cb65becb9870251fedf194b83c92b
Author: James Buren <[email protected]>
Date:   Mon Mar 4 01:53:39 2013 -0600

if we are running in fwlive, set the keyboard layout before
exitting the layout module.

diff --git a/new/fwsetup/layout.c b/new/fwsetup/layout.c
index 70f62ad..c1f4bd0 100644
--- a/new/fwsetup/layout.c
+++ b/new/fwsetup/layout.c
@@ -162,6 +162,28 @@ static bool layout_do_layout(void)
return true;
}

+static bool layout_set_layout(void)
+{
+  char command[_POSIX_ARG_MAX] = {0};
+
+  if(!areweinfwlive())
+    return true;
+
+  if(areweingui())
+    strfcpy(command,sizeof(command),"setxkbmap -layout '%s' -model '%s' 
-variant '%s' -option '%s'",
+      strng(g->xkblayout),
+      strng(g->xkbmodel),
+      strng(g->xkbvariant),
+      strng(g->xkboptions)
+    );
+  else
+    strfcpy(command,sizeof(command),"loadkeys '%s'",
+      strng(g->kbdlayout)
+    );
+
+  return execute(command,"/",0);
+}
+
static bool layout_run(void)
{
if(!layout_setup())
@@ -170,6 +192,9 @@ static bool layout_run(void)
if(!layout_do_layout())
return false;

+  if(!layout_set_layout())
+    return false;
+
return true;
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to