summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-12 11:18:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-12 11:18:25 +0000
commit0b0354f64e88d8efa83d380b8f98bb71db1bab75 (patch)
treeed1e3aab99bf777f51c091a30424e0280e5896a9 /perl-install
parentb107edbf04df4aad4c2f49b4523f7e44c1ba41a2 (diff)
downloaddrakx-0b0354f64e88d8efa83d380b8f98bb71db1bab75.tar
drakx-0b0354f64e88d8efa83d380b8f98bb71db1bab75.tar.gz
drakx-0b0354f64e88d8efa83d380b8f98bb71db1bab75.tar.bz2
drakx-0b0354f64e88d8efa83d380b8f98bb71db1bab75.tar.xz
drakx-0b0354f64e88d8efa83d380b8f98bb71db1bab75.zip
more cleanup
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/mouse.pm17
1 files changed, 9 insertions, 8 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index b35c12ded..4ffcae23e 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -288,12 +288,12 @@ sub detect() {
return fullname2mouse('Universal|Any PS/2 & USB mice', wacom => \@wacom);
}
} else {
- my $auxmouse = detect_devices::hasMousePS2("psaux") && fullname2mouse("PS/2|Automatic", unsafe => 0);
+ my $ps2_mouse = detect_devices::hasMousePS2("psaux") && fullname2mouse("PS/2|Automatic", unsafe => 0);
#- workaround for some special case were mouse is openable 1/2.
- if (!$auxmouse) {
- $auxmouse = detect_devices::hasMousePS2("psaux") && fullname2mouse("PS/2|Automatic", unsafe => 0);
- $auxmouse and detect_devices::hasMousePS2("psaux"); #- fake another open in order for XFree to see the mouse.
+ if (!$ps2_mouse) {
+ $ps2_mouse = detect_devices::hasMousePS2("psaux") && fullname2mouse("PS/2|Automatic", unsafe => 0);
+ $ps2_mouse and detect_devices::hasMousePS2("psaux"); #- fake another open in order for XFree to see the mouse.
}
if (modules::get_probeall("usb-interface")) {
@@ -301,16 +301,17 @@ sub detect() {
if (my (@l) = detect_devices::usbMice()) {
log::l(join('', "found usb mouse $_->{driver} $_->{description} (", if_($_->{type}, $_->{type}), ")")) foreach @l;
if (eval { modules::load(qw(hid mousedev usbmouse)); detect_devices::tryOpen("usbmouse") }) {
- my $mouse = fullname2mouse($l[0]{driver} =~ /Mouse:(.*)/ ? $1 : "USB|Wheel");
- #- for laptop, we kept the PS/2 as secondary (symbolic).
- return { wacom => \@wacom, if_($auxmouse, auxmouse => $auxmouse), %$mouse };
+ return fullname2mouse($l[0]{driver} =~ /Mouse:(.*)/ ? $1 : "USB|Wheel",
+ if_($ps2_mouse, auxmouse => $ps2_mouse), #- for laptop, we kept the PS/2 as secondary (symbolic).
+ wacom => \@wacom);
+
}
eval { modules::unload(qw(usbmouse mousedev hid)) };
}
} else {
log::l("no usb interface found for mice");
}
- return { wacom => \@wacom, %$auxmouse };
+ return { wacom => \@wacom, %$ps2_mouse };
}
#- probe serial device to make sure a wacom has been detected.