diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 10:04:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 10:04:32 +0000 |
commit | 48524e2dc24bae1e80dc7a39e490fe37c089adf3 (patch) | |
tree | 65b80153beda525c57dfeafb6134ce56385cc8ab /lib/Xconfig/default.pm | |
parent | 0f62ff37f66fe87ebdf474831e8bf38c61c44f43 (diff) | |
download | drakx-kbd-mouse-x11-48524e2dc24bae1e80dc7a39e490fe37c089adf3.tar drakx-kbd-mouse-x11-48524e2dc24bae1e80dc7a39e490fe37c089adf3.tar.gz drakx-kbd-mouse-x11-48524e2dc24bae1e80dc7a39e490fe37c089adf3.tar.bz2 drakx-kbd-mouse-x11-48524e2dc24bae1e80dc7a39e490fe37c089adf3.tar.xz drakx-kbd-mouse-x11-48524e2dc24bae1e80dc7a39e490fe37c089adf3.zip |
re-sync after the big svn loss
Diffstat (limited to 'lib/Xconfig/default.pm')
-rw-r--r-- | lib/Xconfig/default.pm | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/Xconfig/default.pm b/lib/Xconfig/default.pm new file mode 100644 index 0000000..d2fb0f7 --- /dev/null +++ b/lib/Xconfig/default.pm @@ -0,0 +1,45 @@ +package Xconfig::default; # $Id$ + +use diagnostics; +use strict; + +use Xconfig::xfree; +use keyboard; +use common; +use mouse; +use modules::any_conf; + + +sub configure { + my ($do_pkgs, $o_keyboard, $o_mouse) = @_; + + my $keyboard = $o_keyboard || keyboard::read_or_default(); + my $mouse = $o_mouse || do { + my $mouse = mouse::read(); + add2hash($mouse, mouse::detect(modules::any_conf->read)) if !$::noauto; + $mouse; + }; + + my $raw_X = Xconfig::xfree->empty_config; + + $raw_X->add_load_module($_) foreach qw(dbe v4l extmod type1 freetype); + + config_keyboard($raw_X, $keyboard); + config_mouse($raw_X, $do_pkgs, $mouse); + + $raw_X; +} + +sub config_mouse { + my ($raw_X, $do_pkgs, $mouse) = @_; + mouse::set_xfree_conf($mouse, $raw_X); + mouse::various_xfree_conf($do_pkgs, $mouse); +} + +sub config_keyboard { + my ($raw_X, $keyboard) = @_; + $raw_X->set_keyboard(keyboard::keyboard2full_xkb($keyboard)); +} + +1; + |