summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-09-12 09:13:15 +0000
committerFrancois Pons <fpons@mandriva.com>2000-09-12 09:13:15 +0000
commit55597dec8c0060b2dab62c51783b18319bb1eb10 (patch)
tree56e2ec87730623ad4e603aab02fbe4390b3f24e4 /perl-install/mouse.pm
parent3a6829ded0f6b8d7ebdff8aec615b134e19b8943 (diff)
downloaddrakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.gz
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.bz2
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.xz
drakx-55597dec8c0060b2dab62c51783b18319bb1eb10.zip
*** empty log message ***
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index cb3dd3d9c..c011519ff 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -167,22 +167,30 @@ sub detect() {
return name2mouse("Apple ADB Mouse");
}
- detect_devices::hasMousePS2 and return { %{name2mouse("Generic Mouse (PS/2)")}, unsafe => 1 };
+ #- probe serial device to make sure a wacom has been detected.
+ eval { commands::modprobe("serial") };
+ my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
+
+ detect_devices::hasMousePS2 and return { %{name2mouse("Generic Mouse (PS/2)")}, unsafe => 1 }, $wacom;
if (modules::get_alias("usb-interface") && detect_devices::hasUsbMouse()) {
eval {
modules::load("usbmouse");
modules::load("mousedev");
};
- !$@ && detect_devices::tryOpen("usbmouse") and return name2mouse("USB Mouse");
+ !$@ && detect_devices::tryOpen("usbmouse") and return name2mouse("USB Mouse"), $wacom;
eval {
modules::unload("mousedev");
modules::unload("usbmouse");
}
}
- eval { commands::modprobe("serial") };
- my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
+ #- in case only a wacom has been found, assume an inexistant mouse (necessary).
+ $wacom and return { CLASS => 'MOUSE',
+ nbuttons => 2,
+ device => "nothing",
+ MOUSETYPE => "Microsoft",
+ XMOUSETYPE => "Microsoft"}, $wacom;
#- defaults to generic serial mouse on ttyS0.
#- Oops? using return let return a hash ref, if not using it, it return a list directly :-)