summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/mouse.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index b9c8a89c7..799d4fba8 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -336,7 +336,7 @@ sub detect() {
}
sub set_xfree_conf {
- my ($mouse, $xfree_conf) = @_;
+ my ($mouse, $xfree_conf, $keep_auxmouse_unchanged) = @_;
my @mice = map {
{
@@ -347,6 +347,11 @@ sub set_xfree_conf {
};
} ($mouse, if_($mouse->{auxmouse}, $mouse->{auxmouse}));
+ if (!$mouse->{auxmouse} && $keep_auxmouse_unchanged) {
+ my (undef, @l) = $xfree_conf->get_mice;
+ push @mice, @l;
+ }
+
$xfree_conf->set_mice(@mice);
}
@@ -362,14 +367,14 @@ sub set_xfree_conf {
#- $mouse->{MOUSETYPE} : type of the mouse : string : ex "ps/2"
#- $mouse->{XEMU3} : emulate 3rd button : string : 'yes' or 'no'
sub write_conf {
- my ($mouse) = @_;
+ my ($mouse, $keep_auxmouse_unchanged) = @_;
&write('', $mouse);
modules::write_conf('') if $mouse->{device} eq "usbmouse" && !$::testing;
require Xconfig::xfree;
my $xfree_conf = Xconfig::xfree->read;
- set_xfree_conf($mouse, $xfree_conf);
+ set_xfree_conf($mouse, $xfree_conf, $keep_auxmouse_unchanged);
$xfree_conf->write;
}