xfree86: Sanity check before retrieving the paired device.
Some pointer devices send key events [1], blindly getting the paired device crashes the server. So let's check if the device is a pointer before we try to get the paired device. [1] The MS Wireless Optical Desktop 2000's multimedia keys are sent through the pointer device, not through the keyboard device.
This commit is contained in:
parent
5a4c6621aa
commit
df2545b98d
|
@ -722,7 +722,10 @@ xf86PostKeyboardEvent(DeviceIntPtr device,
|
|||
int index;
|
||||
|
||||
#if XFreeXDGA
|
||||
DeviceIntPtr pointer = GetPairedDevice(device);
|
||||
DeviceIntPtr pointer;
|
||||
|
||||
/* Some pointers send key events, paired device is wrong then. */
|
||||
pointer = IsPointerDevice(device) ? device : GetPairedDevice(device);
|
||||
|
||||
if (miPointerGetScreen(pointer)) {
|
||||
index = miPointerGetScreen(pointer)->myNum;
|
||||
|
|
Loading…
Reference in New Issue
Block a user