diff --git a/dix/dispatch.c b/dix/dispatch.c index d44687e..1113800 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3566,6 +3566,8 @@ CloseDownClient(register ClientPtr client) } BITCLEAR(grabWaiters, client->index); DeleteClientFromAnySelections(client); + + ReleasePassiveGrabs(client); ReleaseActiveGrabs(client); DeleteClientFontStuff(client); if (!really_close_down) diff --git a/dix/events.c b/dix/events.c index 0053f42..0fdcf28 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1484,6 +1484,19 @@ ProcAllowEvents(register ClientPtr client) return Success; } +void +ReleasePassiveGrabs(ClientPtr client) +{ + WindowPtr pWin; + GrabPtr g; + + REQUEST(xResourceReq); + + dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + for (g = wPassiveGrabs(pWin); g; g= g->next) + DeletePassiveGrabFromList(g); +} + void ReleaseActiveGrabs(ClientPtr client) { diff --git a/include/dix.h b/include/dix.h index 5c2c5b8..d49a31a 100644 --- a/include/dix.h +++ b/include/dix.h @@ -467,6 +467,9 @@ extern void AllowSome( extern void ReleaseActiveGrabs( ClientPtr client); +extern void ReleasePassiveGrabs( + ClientPtr client); + extern int DeliverEventsToWindow( WindowPtr /* pWin */, xEventPtr /* pEvents */,