summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-18 19:37:24 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-18 19:37:24 +0000
commitdca2b557553c775893569d3e8364bfe70efa585b (patch)
tree08a2ebbf88a0f5d583f394642ecffa0980e8d9ed
parentce73cb729e295da6d130da3e0049f2cbb5fd445c (diff)
downloaddrakx-dca2b557553c775893569d3e8364bfe70efa585b.tar
drakx-dca2b557553c775893569d3e8364bfe70efa585b.tar.gz
drakx-dca2b557553c775893569d3e8364bfe70efa585b.tar.bz2
drakx-dca2b557553c775893569d3e8364bfe70efa585b.tar.xz
drakx-dca2b557553c775893569d3e8364bfe70efa585b.zip
use detect_devices::getSynapticsTouchpads() to detect touchpads
-rw-r--r--perl-install/mouse.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index e6478de07..4a8b4272f 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -290,16 +290,15 @@ sub detect {
if (c::kernel_version() =~ /^\Q2.6/) {
$modules_conf->get_probeall("usb-interface") and eval { modules::load('usbhid') };
- my @input_devices = cat_('/proc/bus/input/devices');
my $synaptics_mouse;
- if (my $mouse_nb = scalar grep { /^H: Handlers=mouse/ } @input_devices) {
+ if (my $mouse_nb = scalar grep { /^H: Handlers=mouse/ } cat_('/proc/bus/input/devices')) {
if (is_xbox()) {
return fullname2mouse('Universal|Microsoft Xbox Controller S', if_($::isInstall, alternate_install => fullname2mouse('Universal|Microsoft Xbox Controller S')));
}
my $univ_mouse = fullname2mouse('Universal|Any PS/2 & USB mice', wacom => \@wacom);
- if (my $synaptics_name = find { m!^N: Name="(?:SynPS/2 Synaptics TouchPad|AlpsPS/2 ALPS TouchPad)"$! } @input_devices) {
+ if (my ($synaptics_touchpad) = detect_devices::getSynapticsTouchpads()) {
$synaptics_mouse = fullname2mouse('Universal|Synaptics Touchpad', if_($mouse_nb == 1, wacom => \@wacom));
- $synaptics_mouse->{ALPS} = $synaptics_name =~ /ALPS/;
+ $synaptics_mouse->{ALPS} = $synaptics_touchpad->{description} =~ /ALPS/;
#- do not try to use synpatics at beginning of install
$::isInstall and $synaptics_mouse->{alternate_install} = $univ_mouse;
#- always configure an universal mouse so that USB mices can be hotplugged