diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-04-14 15:24:07 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-04-14 15:24:07 -0700 |
commit | 55f85d6cc28d737314f12958aac49d61b9476657 (patch) | |
tree | 837179c386a6119f63c7dfb83e30fafd8a07ba06 | |
parent | ec6e1e45627de2bb851f135df0507a360d0d99e6 (diff) |
Revert "dix: release all buttons and keys before reattaching a device (#34182)"
This patch introduced a regression, reverting for the 1.10.1 release. See
https://bugs.freedesktop.org/show_bug.cgi?id=36146
This reverts commit 81fbb96c54f78a7cd96433294ee003c7ef6a772a.
-rw-r--r-- | dix/devices.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/dix/devices.c b/dix/devices.c index 84284e778..55f22cbaf 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2380,46 +2380,6 @@ RecalculateMasterButtons(DeviceIntPtr slave) } /** - * Generate release events for all keys/button currently down on this - * device. - */ -static void -ReleaseButtonsAndKeys(DeviceIntPtr dev) -{ - EventListPtr eventlist = InitEventList(GetMaximumEventsNum()); - ButtonClassPtr b = dev->button; - KeyClassPtr k = dev->key; - int i, j, nevents; - - if (!eventlist) /* no release events for you */ - return; - - /* Release all buttons */ - for (i = 0; b && i < b->numButtons; i++) - { - if (BitIsOn(b->down, i)) - { - nevents = GetPointerEvents(eventlist, dev, ButtonRelease, i, 0, NULL); - for (j = 0; j < nevents; j++) - mieqProcessDeviceEvent(dev, (InternalEvent*)(eventlist+j)->event, NULL); - } - } - - /* Release all keys */ - for (i = 0; k && i < MAP_LENGTH; i++) - { - if (BitIsOn(k->down, i)) - { - nevents = GetKeyboardEvents(eventlist, dev, KeyRelease, i); - for (j = 0; j < nevents; j++) - mieqProcessDeviceEvent(dev, (InternalEvent*)(eventlist+j)->event, NULL); - } - } - - FreeEventList(eventlist, GetMaximumEventsNum()); -} - -/** * Attach device 'dev' to device 'master'. * Client is set to the client that issued the request, or NULL if it comes * from some internal automatic pairing. @@ -2452,8 +2412,6 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) free(dev->spriteInfo->sprite); } - ReleaseButtonsAndKeys(dev); - oldmaster = dev->u.master; dev->u.master = master; |