Top secret cursors keys needed ;-)

Fredrik Höglund fredrik at kde.org
Wed Feb 12 20:08:22 GMT 2003


On Wednesday 12 February 2003 13:34, Unai Garro wrote:
> I'm not asking you to change your code :-)
>
> As mentioned by Fredrik Höglund in bug report  54359, QT generates their
> own bitmap cursors (as I saw it as well in qtcursor_x11...)
>
> This means that I need the hash values generated by X for these cursors.
> Fredrik listed some of the hash values, but:
>
> 1) Some of the hash values don't work. Drag n drop cursor still seems to
> fall back to the old cursors. Is there a way to obtain the correct hashes
> easily?

Yes, set the XCURSOR_DISCOVER environment variable before starting
the application with the cursors you're interested in.

I've analyzed the problem with the hash values not working for the
DnD cursors.

Xcursor is a client side library, and since the pixmaps only exist server
side Xcursor can only see them when they're sent to the server.

That means that whenever a 64x64 or smaller pixmap is created it has
to place it in a client side cache to see if it will be used in a
CreatePixmapCursor request.

Unfortunately Qt creates the pixmaps first and then waits until the
cursor is actually needed before sending that request to the server.

At that time the pixmaps have often been pushed out of the cache
since it can only hold 8 pixmaps, thus preventing Xcursor from
computing a hash value from it.

So you'll see the DnD cursors working in some applications like in the
KMail composer window and KWord, but not in the Konqueror icon
views.

> 2) QT uses some non_standard cursors which have no replacement in the
> standard XFree cursor sets, so it's not only a matter of symlinking. One
> needs to generate new cursors only specific to QT. So I would consider bug
> 54359 is still open.

All modern GUI toolkits have had to complement the standard cursors
with non-standard ones. We have our arrow cursors, Gnome has their
open-hand and closed-hand cursors for example.

Enlightenment 0.17 is also using arrow cursors for its window borders,
so this isn't a problem that just affects Qt. It affects everyone.

The standard X11 cursors were created way back in 1987, and a lot has
happened since then in GUI design. We can't simply stop using DnD
cursors because a standard that was created 16 years ago doesn't
mention them.

With the new Xcursor lib we have an opportunity to create a new
standard that includes the newer cursors used by KDE, Gnome and
others, and I've been planning to suggest that on the xdg-list.

And like I've mentioned before on this list, I've discussed this with
Keith Packard, and he has no problems with additional cursors
being added to the redglass and whiteglass themes.

Regards,
Fredrik







More information about the kde-core-devel mailing list