diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-15 13:46:59 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-15 13:46:59 +1000 |
commit | eaf0b6a4d83d49930d21d5191f335fcac962632e (patch) | |
tree | b158918ee5a1d9a18fbaa0a12f0807d0828c43a8 /dix/devices.c | |
parent | 693e92d4049ee76d074737480f3fc1bb236f4278 (diff) | |
parent | 23229c7ce5970516b97a1cc12e65257ff65ab9a7 (diff) |
Merge branch 'master' into input-api
Conflicts:
config/udev.c
hw/xfree86/common/xf86Helper.c
hw/xfree86/common/xf86Module.h
hw/xfree86/common/xf86Xinput.h
hw/xfree86/os-support/linux/lnx_init.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/devices.c')
-rw-r--r-- | dix/devices.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/dix/devices.c b/dix/devices.c index 6a934cf80..6f6f0fa7f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2008,8 +2008,9 @@ ProcChangeKeyboardControl (ClientPtr client) keyboard = PickKeyboard(client); for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((pDev == keyboard || (!IsMaster(pDev) && pDev->u.master == keyboard)) && - pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + if ((pDev == keyboard || + (!IsMaster(pDev) && GetMaster(pDev, MASTER_KEYBOARD) == keyboard)) + && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (ret != Success) return ret; @@ -2017,8 +2018,9 @@ ProcChangeKeyboardControl (ClientPtr client) } for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((pDev == keyboard || (!IsMaster(pDev) && pDev->u.master == keyboard)) && - pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + if ((pDev == keyboard || + (!IsMaster(pDev) && GetMaster(pDev, MASTER_KEYBOARD) == keyboard)) + && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { ret = DoChangeKeyboardControl(client, pDev, vlist, vmask); if (ret != Success) error = ret; @@ -2078,7 +2080,8 @@ ProcBell(ClientPtr client) newpercent = base - newpercent + stuff->percent; for (dev = inputInfo.devices; dev; dev = dev->next) { - if ((dev == keybd || (!IsMaster(dev) && dev->u.master == keybd)) && + if ((dev == keybd || + (!IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == keybd)) && dev->kbdfeed && dev->kbdfeed->BellProc) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); @@ -2147,7 +2150,8 @@ ProcChangePointerControl(ClientPtr client) } for (dev = inputInfo.devices; dev; dev = dev->next) { - if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) && + if ((dev == mouse || + (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) == mouse)) && dev->ptrfeed) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (rc != Success) @@ -2156,7 +2160,8 @@ ProcChangePointerControl(ClientPtr client) } for (dev = inputInfo.devices; dev; dev = dev->next) { - if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) && + if ((dev == mouse || + (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) == mouse)) && dev->ptrfeed) { dev->ptrfeed->ctrl = ctrl; } @@ -2326,7 +2331,7 @@ RecalculateMasterButtons(DeviceIntPtr slave) maxbuttons = max(maxbuttons, dev->button->numButtons); } - if (master->button->numButtons != maxbuttons) + if (master->button && master->button->numButtons != maxbuttons) { int i; DeviceChangedEvent event; @@ -2337,7 +2342,7 @@ RecalculateMasterButtons(DeviceIntPtr slave) event.header = ET_Internal; event.type = ET_DeviceChanged; - event.time = CurrentTime; + event.time = GetTimeInMillis(); event.deviceid = master->id; event.flags = DEVCHANGE_POINTER_EVENT | DEVCHANGE_DEVICE_CHANGE; event.buttons.num_buttons = maxbuttons; @@ -2415,7 +2420,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) WindowPtr currentRoot; if (dev->spriteInfo->sprite) - currentRoot = dev->spriteInfo->sprite->spriteTrace[0]; + currentRoot = GetCurrentRootWindow(dev); else /* new device auto-set to floating */ currentRoot = screenInfo.screens[0]->root; |