summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-18 19:58:17 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-18 19:58:17 +0000
commit1a043448d35d778ffa7e88357df7004d342ecece (patch)
tree8a21ec27f81cdee55ca95c75e6125be15fadf10d
parentdca2b557553c775893569d3e8364bfe70efa585b (diff)
downloaddrakx-1a043448d35d778ffa7e88357df7004d342ecece.tar
drakx-1a043448d35d778ffa7e88357df7004d342ecece.tar.gz
drakx-1a043448d35d778ffa7e88357df7004d342ecece.tar.bz2
drakx-1a043448d35d778ffa7e88357df7004d342ecece.tar.xz
drakx-1a043448d35d778ffa7e88357df7004d342ecece.zip
preselect synaptics touchpad if no external mouse is present
-rw-r--r--perl-install/mouse.pm9
1 files changed, 6 insertions, 3 deletions
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);
}