diff options
author | Keith Packard <keithp@keithp.com> | 2009-02-17 18:57:13 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-02-17 18:57:13 -0800 |
commit | 7fdaca64463951ab9199dc12910379c90dba3fac (patch) | |
tree | 05b9d7737760f0e170f2047757d164ddc55c5d67 | |
parent | a9dd41de7eecc1dcede4ccc8d5cf25f10343bb1a (diff) |
mi: force the paired kbd device before CopyKeyClass. (#19574)
Some multi-media keyboards send the key events for multimedia keys through
the device file used by the mouse. Sending a key event through the VCP
however will fail. The VCP doesn't have a key class so the server crashes or
(with an appropriate fix) the event is simply swallowed.
Thus, for key events if the master does not have a key class, get the device
paired with the master (i.e. the VCK) before processing the event any
further.
X.Org Bug 19574 <http://bugs.freedesktop.org/show_bug.cgi?id=19574>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | mi/mieq.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -451,7 +451,11 @@ mieqProcessInputEvents(void) is transferred. */ if (event->u.u.type == DeviceKeyPress || event->u.u.type == DeviceKeyRelease) + { + if (!master->key) + master = GetPairedDevice(master); CopyKeyClass(dev, master); + } CopyGetMasterEvent(master, dev, event, masterEvents, nevents); } |