summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-09-06 15:43:47 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-09-06 15:43:47 +0930
commit03680a384aa423ece75b658f00b96db2628c39fa (patch)
tree3f48a4ed8cb48e0169945c6ee5ab7fcd4bec82cf /Xi
parentc4fff050836feeef8390b7197f1de39af2997811 (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')
-rw-r--r--Xi/exevents.c3
-rw-r--r--Xi/extinit.c12
2 files changed, 12 insertions, 3 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 8f60561e9..aa2b4c9de 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -126,9 +126,6 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
ValuatorClassPtr v = device->valuator;
deviceValuator *xV = (deviceValuator *) xE;
- if (grab && grab->coreGrab && !device->deviceGrab.fromPassiveGrab)
- return;
-
CheckMotion(xE, device);
if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) {
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);