dix: ignore devices when adding passive core grabs to list (#39545)

Passive core grabs are mostly device-independent. In an MPX scenario, they
may change to reflect whichever master pair activated the grab last. For
adding new grabs to the list, ignore the device for core grabs to return
failures when trying to set the same grab combo twice on a window.

X.Org Bug 39545 <http://bugs.freedesktop.org/show_bug.cgi?id=39545>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 09496996ac)
This commit is contained in:
Peter Hutterer 2011-07-28 15:56:08 +10:00
parent cb9c1d6d6c
commit 843737b4f9

View file

@ -479,7 +479,7 @@ AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab)
for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next)
{
if (GrabMatchesSecond(pGrab, grab, FALSE))
if (GrabMatchesSecond(pGrab, grab, (pGrab->grabtype == GRABTYPE_CORE)))
{
if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource))
{