diff options
Diffstat (limited to 'xkb/xkbActions.c')
-rw-r--r-- | xkb/xkbActions.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 890cf4250..ab0802d59 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -858,7 +858,7 @@ ProcessInputProc backupproc; if ((filter->keycode!=0)&&(filter->keycode!=keycode)) return 1; - GetSpritePosition(&x,&y); + GetSpritePosition(inputInfo.pointer, &x,&y); ev.u.keyButtonPointer.time = GetTimeInMillis(); ev.u.keyButtonPointer.rootX = x; ev.u.keyButtonPointer.rootY = y; @@ -903,10 +903,6 @@ ProcessInputProc backupproc; realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; - /* XXX: Bad! Since the switch to XI devices xkbi->device will be the - * XI device. Sending a core event through ProcessOtherEvent will - * cause trouble. Somebody should fix this. - */ UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, @@ -949,10 +945,6 @@ ProcessInputProc backupproc; realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; - /* XXX: Bad! Since the switch to XI devices xkbi->device will be the - * XI device. Sending a core event through ProcessOtherEvent will - * cause trouble. Somebody should fix this. - */ UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, @@ -1282,14 +1274,17 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); } if (sendEvent) { + DeviceIntPtr tmpdev; if (keyEvent) { realMods = keyc->modifierMap[key]; keyc->modifierMap[key] = 0; - } + tmpdev = dev; + } else + tmpdev = GetPairedDevice(dev); - UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr, backupproc); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_PROCESS_INPUT_PROC(dev, xkbPrivPtr, + 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; |