From dca2b557553c775893569d3e8364bfe70efa585b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 18 Apr 2005 19:37:24 +0000 Subject: use detect_devices::getSynapticsTouchpads() to detect touchpads --- perl-install/mouse.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl-install/mouse.pm') 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 -- cgit v1.2.1