summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/default.pm
blob: 586e4a4100384c758c0019a55e5118a28e884558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package Xconfig::default; # $Id: default.pm 266062 2010-02-09 18:55:05Z anssi $

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 $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('v4l');

    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);
}

1;