summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-01 17:09:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-01 17:09:26 +0000
commitd004436dc848800c9d65b90e39c39836c4d44cdf (patch)
treeb37bdcac9dad762a2b692076522785a83533c5f6 /perl-install/mouse.pm
parent1dc94110fc837dbe6cf06806f60c207ab1b64e83 (diff)
downloaddrakx-backup-do-not-use-d004436dc848800c9d65b90e39c39836c4d44cdf.tar
drakx-backup-do-not-use-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.gz
drakx-backup-do-not-use-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.bz2
drakx-backup-do-not-use-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.xz
drakx-backup-do-not-use-d004436dc848800c9d65b90e39c39836c4d44cdf.zip
no_comment
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 056f3749f..4ab9c9a32 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -87,7 +87,7 @@ sub write($;$) {
}
sub mouseconfig {
- my ($t, $mouse);
+ my ($t, $mouse, $wacom);
foreach (0..1) { #- probe only ttyS0 and ttyS1.
$t = detect_devices::probe_device("/dev/ttyS$_");
@@ -101,16 +101,18 @@ sub mouseconfig {
$mouse ||= name2mouse("Generic Mouse (serial)"); #- generic by default.
$mouse->{device} = "ttyS$_";
last;
+ } elsif ($t->{CLASS} eq "PEN" || $t->{MANUFACTURER} eq "WAC") {
+ $wacom = "ttyS$_";
}
}
- $mouse;
+ $mouse, $wacom;
}
sub detect() {
detect_devices::hasMousePS2 and return name2mouse("Generic Mouse (PS/2)");
eval { commands::modprobe("serial") };
- my $r; $r = mouseconfig(); return $r if $r;
+ my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
#- my %l;
#- eval { commands::modprobe("serial") };
#- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
@@ -120,7 +122,7 @@ sub detect() {
if (my ($c) = pci_probing::main::probe("serial_usb")) {
eval { modules::load($c->[1], "serial_usb") };
sleep(1);
- do { modules::unload("serial"); return name2mouse("USB Mouse") } if !$@ && detect_devices::tryOpen("usbmouse");
+ do { $wacom or modules::unload("serial"); return name2mouse("USB Mouse"), $wacom } if !$@ && detect_devices::tryOpen("usbmouse");
modules::unload($c->[1]);
}
die "mouseconfig failed";