XCreatePixmapCursor stats a lot of files...

Glynn Clements glynn at gclements.plus.com
Wed Oct 3 09:57:31 PDT 2007

BJörn Lindqvist wrote:

> > > While stracing a program, I found that XCreatePixmapCursor() has some
> > > very surprising behavior.
> >
> > FWIW, configuring with --disable-loadable-xcursor works and eliminates
> > the problem (libXcursor is not loaded and the file checks don't
> > occur).
> That disables cursor theming altogether. It is ok that
> XCreateGlyphCursor() and XCreateFontCursor() browses the disk to find
> a fitting cursor because you only specify the cursor by name when
> calling those functions.

True for XCreateFontCursor(), but XCreateGlyphCursor() shouldn't be
getting "themed" either. XCreateGlyphCursor() takes source_font and
mask_font parameters; those should be used, not ignored.

With XCreateFontCursor(), the "font" is specified as being
system-dependent, so it isn't an issue in that case. Even so, I would
rather just see applications use XcursorShapeLoadCursor(), rather than
expecting Xlib to do it for them.

Glynn Clements <glynn at gclements.plus.com>

More information about the xorg mailing list