summaryrefslogtreecommitdiffstats
path: root/lib/mouse.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-07-09 17:18:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-07-09 17:18:11 +0000
commit651e7e8beae442aa94cde31e4a7dc660e6ffb998 (patch)
treef80a56a12b10aae3d0abf9a1e1aefacd41436407 /lib/mouse.pm
parent9134af7ac0b3e6962f55d27dcb149b7259b94033 (diff)
downloaddrakx-kbd-mouse-x11-651e7e8beae442aa94cde31e4a7dc660e6ffb998.tar
drakx-kbd-mouse-x11-651e7e8beae442aa94cde31e4a7dc660e6ffb998.tar.gz
drakx-kbd-mouse-x11-651e7e8beae442aa94cde31e4a7dc660e6ffb998.tar.bz2
drakx-kbd-mouse-x11-651e7e8beae442aa94cde31e4a7dc660e6ffb998.tar.xz
drakx-kbd-mouse-x11-651e7e8beae442aa94cde31e4a7dc660e6ffb998.zip
- wacom configuration:
o enhance configuration by using /dev/input/by-id/xxx (need drakxtools-backend >= 10.4.144)
Diffstat (limited to 'lib/mouse.pm')
-rw-r--r--lib/mouse.pm23
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/mouse.pm b/lib/mouse.pm
index 7f8e056..9ffd2fd 100644
--- a/lib/mouse.pm
+++ b/lib/mouse.pm
@@ -239,15 +239,20 @@ sub write {
}
sub probe_usb_wacom_devices() {
- my (@l) = detect_devices::usbWacom() or return;
+ detect_devices::hasWacom() or return;
- log::l("found usb wacom $_->{driver} $_->{description} ($_->{type})") foreach @l;
- my @wacom = eval {
- modules::load("wacom", "evdev");
- grep { detect_devices::tryOpen($_) } map_index { "input/event$::i" } @l;
- };
- @wacom or eval { modules::unload("evdev", "wacom") };
- @wacom;
+ eval { modules::load("wacom", "evdev") };
+
+ map {
+ my $ID_SERIAL = chomp_(run_program::get_stdout('/lib/udev/usb_id', $_->{sysfs_path}));
+ my $sysfs_device = "input/by-id/usb-$ID_SERIAL-event-mouse"; #- from /etc/udev/rules.d/60-persistent-input.rules
+ if ($::isInstall || -e "/dev/$sysfs_device") {
+ $sysfs_device;
+ } else {
+ log::l("$sysfs_device missing");
+ ();
+ }
+ } detect_devices::usbWacom();
}
sub detect_serial() {
@@ -393,7 +398,7 @@ sub set_xfree_conf {
$xfree_conf->set_mice(@mice);
if (my @wacoms = @{$mouse->{wacom} || []}) {
- $xfree_conf->set_wacoms(map { { Device => "/dev/$_", USB => m|input/event| } } @wacoms);
+ $xfree_conf->set_wacoms(map { { Device => "/dev/$_", USB => to_bool(m|input/by-path/event|) } } @wacoms);
}
$xfree_conf->set_synaptics({