aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xorg-server/dix/grabs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c
index 701470c83..a6351b6e4 100644
--- a/xorg-server/dix/grabs.c
+++ b/xorg-server/dix/grabs.c
@@ -193,9 +193,8 @@ UngrabAllDevices(Bool kill_client)
continue;
PrintDeviceGrabInfo(dev);
client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
- if (!client || client->clientGone)
- dev->deviceGrab.DeactivateGrab(dev);
- CloseDownClient(client);
+ dev->deviceGrab.DeactivateGrab(dev);
+ if (kill_client) CloseDownClient(client);
}
ErrorF("End list of ungrabbed devices\n");