[PATCH] Include client name if available in PrintDeviceGrabInfo

Rami Ylimäki rami.ylimaki at vincit.fi
Thu Dec 8 01:28:06 PST 2011


On 12/08/2011 09:02 AM, Alan Coopersmith wrote:
> Also adds missing newline to first line of output.
>
> Before patch:
>
> [3581472.414] (II) Printing all currently active device grabs:
> [3581472.414] Active grab 0x1800000 (core) on device 'Virtual core pointer' (2):
>        client pid 26174 uid 0 gid 10
> [3581472.415]       at 3581469139 (from active grab) (device thawed, state 1)
> [3581472.415]         core event mask 0x0
> [3581472.415]       owner-events true, kb 1 ptr 1, confine 0, cursor 0x0
> [3581472.415] Active grab 0x1800000 (core) on device 'Virtual core keyboard' (3)
> :      client pid 26174 uid 0 gid 10
> [3581472.415]       at 3581469139 (from active grab) (device thawed, state 1)
> [3581472.415]         core event mask 0x3
> [3581472.415]       owner-events true, kb 1 ptr 1, confine 0, cursor 0x0
> [3581472.415] (II) End list of active device grabs
>
> After patch:
> [3581736.601] (II) Printing all currently active device grabs:
> [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core pointer' (2):
> [3581736.601]       client pid 26741 /usr/bin/xscreensaver -nosplash
> [3581736.601]       at 3581735000 (from active grab) (device thawed, state 1)
> [3581736.601]         core event mask 0x0
> [3581736.601]       owner-events true, kb 1 ptr 1, confine 0, cursor 0x0
> [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core keyboard' (3)
> :
> [3581736.601]       client pid 26741 /usr/bin/xscreensaver -nosplash
> [3581736.601]       at 3581735000 (from active grab) (device thawed, state 1)
> [3581736.601]         core event mask 0x3
> [3581736.601]       owner-events true, kb 1 ptr 1, confine 0, cursor 0x0
> [3581736.601] (II) End list of active device grabs
>
> Signed-off-by: Alan Coopersmith<alan.coopersmith at oracle.com>

Reviewed-by: Rami Ylimäki <rami.ylimaki at vincit.fi>

> +        ErrorF("      (no client information available for client %d)\n",
> +               CLIENT_ID(grab->resource));

I'd prefer the format to be %lx as that is used generally for resources. 
That would make it easier to find the client XID from output of xrestop 
for example.

-- Rami



More information about the xorg-devel mailing list