[PATCH] UngrabAllDevices: Don't kill clients if not told to

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 19 19:59:29 PST 2012


On Thu, Jan 19, 2012 at 10:40:32PM +1100, Daniel Stone wrote:
> The kill_client argument to UngrabAllClients specifies if we want to
> kill the client holding the grab or just deactivate the grab.
> 
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> Reported-by: Julien Cristau <jcristau at debian.org>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter

> ---
>  dix/grabs.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/grabs.c b/dix/grabs.c
> index 701470c..cc2c946 100644
> --- a/dix/grabs.c
> +++ b/dix/grabs.c
> @@ -195,7 +195,8 @@ UngrabAllDevices(Bool kill_client)
>          client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
>          if (!client || client->clientGone)
>              dev->deviceGrab.DeactivateGrab(dev);
> -        CloseDownClient(client);
> +        if (kill_client)
> +            CloseDownClient(client);
>      }
>  
>      ErrorF("End list of ungrabbed devices\n");
> -- 
> 1.7.8.3
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list