summaryrefslogtreecommitdiff
path: root/tests/xkbTestFunc.pm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xkbTestFunc.pm')
-rwxr-xr-xtests/xkbTestFunc.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/xkbTestFunc.pm b/tests/xkbTestFunc.pm
index 8d51121..0ec3ada 100755
--- a/tests/xkbTestFunc.pm
+++ b/tests/xkbTestFunc.pm
@@ -38,13 +38,14 @@ sub getXkbSettings
sub setXkbSettings
{
my ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions ) = @_;
- ( system ( "setxkbmap", "-synch",
- "-rules", $xkbRules,
- "-model", $xkbModel,
- "-layout", $xkbLayouts,
- "-variant", $xkbVariants,
- "-option", $xkbOptions ) == 0 ) or die "Could not set xkb configuration";
- sleep 1;
+ my $outfile = ".test.out.xkb";
+ ( system ( "setxkbmap -rules \"$xkbRules\" " .
+ "-model \"$xkbModel\" " .
+ "-layout \"$xkbLayouts\" " .
+ "-variant \"$xkbVariants\" " .
+ "-option \"$xkbOptions\" " .
+ "-print | xkbcomp - -xkb $outfile" ) == 0 ) or die "Could not set xkb configuration";
+ unlink($outfile);
}
sub restoreXkbSettings