diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-09-06 15:43:47 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-09-06 15:43:47 +0930 |
commit | 03680a384aa423ece75b658f00b96db2628c39fa (patch) | |
tree | 3f48a4ed8cb48e0169945c6ee5ab7fcd4bec82cf /Xi/extinit.c | |
parent | c4fff050836feeef8390b7197f1de39af2997811 (diff) |
dix: don't change the device struct while processing core events.
The device state needs to be changed while processing the XI event. Core
events are always processed after XI, so by then the device is already set up
properly. However, we now rely on DeviceButtonMotionMask to be equal to
ButtonMotionMask. It already is, but stick a big fat warning in so nobody
attempts to change it.
This commit disables XKB for the VCK, thus essentially for all devices.
Temporarily anyway.
Diffstat (limited to 'Xi/extinit.c')
-rw-r--r-- | Xi/extinit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c index 70253fe82..1d23809dc 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -879,8 +879,20 @@ FixExtensionEvents(ExtensionEntry * extEntry) SetEventInfo(GetNextExtEventMask(), _deviceButton3Motion); SetEventInfo(GetNextExtEventMask(), _deviceButton4Motion); SetEventInfo(GetNextExtEventMask(), _deviceButton5Motion); + + /* If DeviceButtonMotionMask is != ButtonMotionMask, event delivery + * breaks down. The device needs the dev->button->motionMask. If DBMM is + * the same as BMM, we can ensure that both core and device events can be + * delivered, without the need for extra structures in the DeviceIntRec. + */ DeviceButtonMotionMask = GetNextExtEventMask(); SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion); + if (DeviceButtonMotionMask != ButtonMotionMask) + { + /* This should never happen, but if it does, hide under the + * bed and cry for help. */ + ErrorF("DeviceButtonMotionMask != ButtonMotionMask. Trouble!\n"); + } DeviceFocusChangeMask = GetNextExtEventMask(); SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn); |