[PATCH] dix: Properly detect if the other device is frozen

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Oct 27 18:03:08 PDT 2009


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5820 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091027/0c97fa08/attachment.bin 


More information about the xorg-devel mailing list