summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-09-27 11:44:03 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-09-27 11:44:03 +0930
commit32d0440c7f6e604807cb14dd32349df6f22c903b (patch)
treed503030ad4234758a43c19fbfeec4161f15d4cd8
parent8f9bf927e1beecf9b9ec8877131ec12c765e4d84 (diff)
xkb: xkbHandleActions: let wrapping take care of event delivery.
This is hopefully better than hardcodey calling CoreProcessPointerEvent.
-rw-r--r--xkb/xkbActions.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index cc707bd44..891b91544 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -1148,7 +1148,6 @@ XkbAction act;
XkbFilterPtr filter;
Bool keyEvent;
Bool pressEvent;
-Bool xiEvent;
ProcessInputProc backupproc;
xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
@@ -1173,9 +1172,6 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
(xE->u.u.type==KeyRelease)||(xE->u.u.type==DeviceKeyRelease));
pressEvent= (xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress)||
(xE->u.u.type==ButtonPress)||(xE->u.u.type==DeviceButtonPress);
- xiEvent= (xE->u.u.type==DeviceKeyPress)||(xE->u.u.type==DeviceKeyRelease)||
- (xE->u.u.type==DeviceButtonPress)||
- (xE->u.u.type==DeviceButtonRelease);
if (pressEvent) {
if (keyEvent)
@@ -1279,23 +1275,21 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
}
if (sendEvent) {
+ DeviceIntPtr tmpdev;
if (keyEvent) {
realMods = keyc->modifierMap[key];
keyc->modifierMap[key] = 0;
- UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr, backupproc);
- dev->public.processInputProc(xE,dev,count);
- COND_WRAP_PROCESS_INPUT_PROC(dev, xkbPrivPtr,
- backupproc,xkbUnwrapProc);
+ tmpdev = dev;
+ } else
+ tmpdev = GetPairedPointer(dev);
+
+
+ UNWRAP_PROCESS_INPUT_PROC(tmpdev,xkbPrivPtr, backupproc);
+ dev->public.processInputProc(xE,tmpdev,count);
+ COND_WRAP_PROCESS_INPUT_PROC(tmpdev, xkbPrivPtr,
+ backupproc,xkbUnwrapProc);
+ if (keyEvent)
keyc->modifierMap[key] = realMods;
- }
- else
- {
- if (xE->u.u.type & EXTENSION_EVENT_BASE)
- ProcessOtherEvent(xE, dev, count);
- else
- CoreProcessPointerEvent(xE,dev,count);
-
- }
}
else if (keyEvent)
FixKeyState(xE,dev);