[PATCH] dix: Properly detect if the other device is frozen
Peter Hutterer
peter.hutterer at who-t.net
Wed Oct 28 16:34:44 PDT 2009
On Tue, Oct 27, 2009 at 06:03:08PM -0700, Jeremy Huddleston wrote:
> othersFrozen was getting unset. We should detect if it should be set
> to true rather than setting it false for a device that isn't frozen
>
> Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
> ---
> dix/events.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/dix/events.c b/dix/events.c
> index d070a4c..015c2b1 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -1673,7 +1673,7 @@ AllowSome(ClientPtr client,
> thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab,
> client);
> thisSynced = FALSE;
> otherGrabbed = FALSE;
> - othersFrozen = TRUE;
> + othersFrozen = FALSE;
> grabTime = grabinfo->grabTime;
> for (dev = inputInfo.devices; dev; dev = dev->next)
> {
> @@ -1689,11 +1689,9 @@ AllowSome(ClientPtr client,
> otherGrabbed = TRUE;
> if (grabinfo->sync.other == devgrabinfo->grab)
> thisSynced = TRUE;
> - if (devgrabinfo->sync.state < FROZEN)
> - othersFrozen = FALSE;
> + if (devgrabinfo->sync.state >= FROZEN)
> + othersFrozen = TRUE;
> }
> - else if (!devgrabinfo->sync.other || !SameClient(devgrabinfo->sync.other,
> client))
> - othersFrozen = FALSE;
> }
> if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) ||
> thisSynced))
> return;
> --
> 1.6.5.1
I looked at this patch and I can't see any reason why that shouldn't
work. I'll leave it running on my box for a while to see if it does
anything bad, grab syncing is...complicated.
Cheers,
Peter
More information about the xorg-devel
mailing list