Slow XQueryPointer?

Alan Coopersmith alan.coopersmith at
Thu Jan 26 10:42:07 PST 2012

On 01/26/12 07:51 AM, Lauri Kasanen wrote:
> On Thu, 26 Jan 2012 09:37:28 -0500
> Adam Jackson<ajax at>  wrote:
> Hi Adam
>>> Any suggestions on making the call faster? Would it be possible to use
>>> it with a timeout, say, if it takes over 1ms, abort?
>> Xlib doesn't work that way.  You could do that with XCB and a main loop
>> though.
> XCB is unfortunately not possible.

You don't have to convert the entire app to XCB to be able to use it for
just one or two calls, for example, most of xdpyinfo uses libX11 calls
still, but the loop to list extensions uses xcb to be able to send all
the queries and then wait for all the responses instead of doing a blocking
call for every single extension:

More in-depth explanations at:

	-Alan Coopersmith-        alan.coopersmith at
	 Oracle Solaris Platform Engineering: X Window System

More information about the xorg mailing list