summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-08-29 16:44:23 +0000
committerFrancois Pons <fpons@mandriva.com>2001-08-29 16:44:23 +0000
commit700209f718e9d1ded925b1eab5ae09f96b0b9074 (patch)
treecc63482bde3c1b9d8d05a31fbfcf35318a8bfdfe /perl-install/Xconfig.pm
parent7e66953ca65d3dcd4b48e5b197818c478f05b945 (diff)
downloaddrakx-700209f718e9d1ded925b1eab5ae09f96b0b9074.tar
drakx-700209f718e9d1ded925b1eab5ae09f96b0b9074.tar.gz
drakx-700209f718e9d1ded925b1eab5ae09f96b0b9074.tar.bz2
drakx-700209f718e9d1ded925b1eab5ae09f96b0b9074.tar.xz
drakx-700209f718e9d1ded925b1eab5ae09f96b0b9074.zip
improve getinfoFromXF86Config for mouse parameters.
Diffstat (limited to 'perl-install/Xconfig.pm')
-rw-r--r--perl-install/Xconfig.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm
index 4bf6b112a..3b40de6f5 100644
--- a/perl-install/Xconfig.pm
+++ b/perl-install/Xconfig.pm
@@ -56,7 +56,6 @@ sub getinfoFromXF86Config {
$c{device} ||= $1 if /^\s*Option\s+"Device"\s+"\/dev\/(.*?)"/;
$c{chordmiddle} ||= $1 if /^\s*Option\s+"ChordMiddle"\s+"\/dev\/(.*?)"/;
$c{nbuttons} = 2 if /^\s*Option\s+"Emulate3Buttons"\s+/;
- $c{nbuttons} ||= 3 if /^\s*#\s*Option\s+"Emulate3Buttons"\s+/;
$c{nbuttons} ||= 5 if /^\s*#\s*Option\s+"ZAxisMapping"\s.*5/;
$c{nbuttons} = 7 if /^\s*#\s*Option\s+"ZAxisMapping"\s.*7/;
@@ -103,7 +102,6 @@ sub getinfoFromXF86Config {
$mouse{cleardtrrts} ||= 1 if m/^\s*ClearRTS\s+/;
$mouse{chordmiddle} ||= 1 if m/^\s*ChordMiddle\s+/;
$mouse{nbuttons} = 2 if m/^\s*Emulate3Buttons\s+/;
- $mouse{nbuttons} ||= 3 if m/^\s*#\s*Emulate3Buttons\s+/;
$mouse{nbuttons} ||= 5 if m/^\s*ZAxisMapping\s.*5/;
$mouse{nbuttons} = 7 if m/^\s*ZAxisMapping\s.*7/;
} elsif (/^Section "XInput"/ .. /^EndSection/) {
@@ -162,6 +160,10 @@ sub getinfoFromXF86Config {
$o->{card}{suggest_wres} = ($card{depth}{$o->{card}{suggest_depth} || $depth[0]}[0][0]);
}
+ #- final clean-up.
+ $mouse{nbuttons} ||= 3; #- when no tag found, this is because there is 3 buttons.
+ mouse::update_type_name(\%mouse); #- allow getting fullname (type|name).
+
#- try to merge with $o, the previous has been obtained by ddcxinfos.
add2hash($o->{keyboard} ||= {}, \%keyboard);
add2hash($o->{mouse} ||= {}, \%mouse);