summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index f37bcc9fd..08205213a 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -253,15 +253,16 @@ sub detect() {
};
if (modules::get_alias("usb-interface")) {
+ my $keep_mouse;
if (my (@l) = detect_devices::usbWacom()) {
log::l("found usb wacom $_->{driver} $_->{description} ($_->{type})") foreach @l;
eval { modules::load("wacom"); modules::load("evdev"); };
unless ($@) {
foreach (0..$#l) {
- detect_devices::tryOpen("input/event$_") and push @wacom, "input/event$_";
+ detect_devices::tryOpen("input/event$_") and $keep_mouse = 1, push @wacom, "input/event$_";
}
}
- eval { modules::unload("evdev"); modules::unload("wacom"); };
+ $keep_mouse or eval { modules::unload("evdev"); modules::unload("wacom"); };
}
}