[PATCH] xkb: merge lockedPtrButtons state from all attached SDs.
Keith Packard
keithp at keithp.com
Mon Jun 28 22:30:24 PDT 2010
On Tue, 29 Jun 2010 14:05:52 +1000, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> +
> +/* Merge the lockedPtrButtons from all attached SDs for the given master
> + * device into the MD's state.
> + */
> +void
> +XkbMergeLockedPtrBtns(DeviceIntPtr master)
> +{
> + DeviceIntPtr d = inputInfo.devices;
> + XkbSrvInfoPtr xkbi = NULL;
> +
> + if (!master->key)
> + return;
> +
> + xkbi = master->key->xkbInfo;
> +
> + for (; d; d = d->next) {
> + if (IsMaster(d) || GetMaster(d, MASTER_KEYBOARD) != master || !d->key)
> + continue;
> +
> + xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons;
> + }
> +}
Should this function set xkbi->lockedPtrButtons to 0 before looping over
the devices? Otherwise, it seems like this function is misnamed (not
that I understand what the code is doing...)
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100628/7f58235f/attachment.pgp>
More information about the xorg-devel
mailing list