From 1a043448d35d778ffa7e88357df7004d342ecece Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 18 Apr 2005 19:58:17 +0000 Subject: preselect synaptics touchpad if no external mouse is present --- perl-install/mouse.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 4a8b4272f..a99d6f96b 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -301,7 +301,11 @@ sub detect { $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 + if ($mouse_nb == 1) { + #- always configure an universal mouse so that USB mices can be hotplugged + $synaptics_mouse->{auxmouse} = $univ_mouse; + return $synaptics_mouse; + } $univ_mouse->{auxmouse} = $synaptics_mouse; } return $univ_mouse; @@ -372,7 +376,6 @@ sub set_xfree_conf { my ($synaptics, $mouse_) = partition { $_->{name} eq N_("Synaptics Touchpad") } ($mouse, if_($mouse->{auxmouse}, $mouse->{auxmouse})); - delete $mouse->{auxmouse} if $synaptics && $synaptics == $mouse->{auxmouse}; my @mice = map { { Protocol => $_->{XMOUSETYPE}, @@ -397,7 +400,7 @@ sub set_xfree_conf { $synaptics and $xfree_conf->set_synaptics(map { { Device => "/dev/$_->{device}", Protocol => $_->{XMOUSETYPE}, - Primary => $_ != $mouse->{auxmouse}, + Primary => !exists($mouse->{auxmouse}), ALPS => $_->{ALPS}, } } @$synaptics); } -- cgit v1.2.1