diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-25 16:07:45 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-30 11:17:05 +1000 |
commit | e8806d4f08cd4707d5c563c70201cbcbb844f8e2 (patch) | |
tree | e2afde73549067320a8f094608232e364f43d7d7 | |
parent | ff09b66c1cf4c6301ab0f65916e471716f50639f (diff) |
XOrg: if InputClasses are different to the device name, it's a new device
The first message from Wacom hotplugged devices is simply the input classes
applied.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-x | XOrg/InputDevice.pm | 2 | ||||
-rwxr-xr-x | XOrg/xorglog.pm | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/XOrg/InputDevice.pm b/XOrg/InputDevice.pm index e097d9b..c94c8b5 100755 --- a/XOrg/InputDevice.pm +++ b/XOrg/InputDevice.pm @@ -74,7 +74,7 @@ sub module { return $self->{module}; } -# Source is "hal", "udev", "implicit" or "xorg.conf" +# Source is "hal", "udev", "implicit", "internal" or "xorg.conf" sub source { my $self = shift; my $source = shift; diff --git a/XOrg/xorglog.pm b/XOrg/xorglog.pm index 36c30d7..a802efd 100755 --- a/XOrg/xorglog.pm +++ b/XOrg/xorglog.pm @@ -200,8 +200,18 @@ sub _parse_input_drivers { next if not defined $dev; - if ($_ =~ /$time_regex \(\*\*\) $dev->{name}: Applying InputClass "(.*)"/) { - $dev->add_inputclass($1) + if ($_ =~ /$time_regex \(\*\*\) (.*): Applying InputClass "(.*)"/) { + if ($1 eq $dev->name) { + $dev->add_inputclass($2) + } else { + # This can happen with hotplugged wacom + # devices. + $dev = InputDevice->new( + name => $1, + source => "internal" + ); + push @{$self->{devices}}, $dev; + } } elsif ($_ =~ /$time_regex \(II\) Using input driver '(.*)' for '$dev->{name}'/) { $dev->module($self->modules->{$1}); } elsif ($_ =~ /$time_regex \(\*\*\) Option "(.*)" "(.*)"/) { |