XCreatePixmapCursor stats a lot of files...

Glynn Clements glynn at gclements.plus.com
Tue Oct 2 13:22:00 PDT 2007


Lubos Lunak wrote:

> > The inefficiency isn't the problem. The fact that it's happening at
> > all is the problem. If the client tells Xlib to use a specific pixmap
> > and mask as the cursor, Xlib should damn well do what it's told, not
> > ignore the client and use some other cursor.
> 
>  So you actually got some other cursor than you asked for?

No; I don't have any "themed" cursors installed, so there's nowhere it
can get a different cursor from.

> I shouldn't think 
> so, I'd expect that in your specific case it did exactly what you expected, 
> minus some hidden inefficiency which, as you say, isn't a problem for you.

Looking at the source code for libX11 and libXcursor suggests that
XCreatePixmapCursor() *may* ignore the specified pixmap/mask and use
some other cursor instead.

I note that the code is conditionalised. However, the default is for
it to be enabled, which is wrong. If you want this kind of half-assed
hack, it should be specifically requested, rather than sneaking under
the radar of anyone failing to scrutinise the "fine print".

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list