summaryrefslogtreecommitdiffstats
path: root/xkb.py
diff options
context:
space:
mode:
authorpnfisher <pnfisher>1999-09-25 02:50:36 +0000
committerpnfisher <pnfisher>1999-09-25 02:50:36 +0000
commitd18f1bd98817564facc0a83d4aa39143f13d2ba8 (patch)
tree63df96caa4764ffbc637366ee828b344b62f1704 /xkb.py
parenta52ddd9b7f932004a8fcb8c88ad768baac082ada (diff)
downloadanaconda-d18f1bd98817564facc0a83d4aa39143f13d2ba8.tar.gz
anaconda-d18f1bd98817564facc0a83d4aa39143f13d2ba8.tar.xz
anaconda-d18f1bd98817564facc0a83d4aa39143f13d2ba8.zip
Make go -- without memory corruption (we call setxkbmap).
Diffstat (limited to 'xkb.py')
-rw-r--r--xkb.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/xkb.py b/xkb.py
index 88e5bde0e..f3000d336 100644
--- a/xkb.py
+++ b/xkb.py
@@ -1,6 +1,7 @@
import _xkb
import tree
import string
+import os
class XKB:
def __init__ (self):
@@ -31,8 +32,27 @@ class XKB:
if variant == None: variant = ""
if options == None: options = ""
+ args = ()
+
+ if (model):
+ args = args + ("-model", model)
+ if (layout):
+ args = args + ("-layout", layout)
+ if (variant):
+ args = args + ("-variant", variant)
+
+ path = ("/usr/X11R6/bin/setxkbmap",)
+ if (os.fork () == 0):
+ os.execv (path[0], path + args)
+
+ return
+
+ # don't use any of our code, since it seems to corrupt
+ # lots of memory
return _xkb.set_rule (model, layout, variant, options)
+
+
def getRulesBase (self):
return _xkb.get_rulesbase ()