XCursor patch

Zack Rusin zack at kde.org
Sun Nov 24 19:47:30 GMT 2002


On Sunday 24 November 2002 14:31, Fredrik Höglund wrote:
> Because with XCreateFontCursor() you only have access to the
> cursors defined in X11/cursorfont.h. Many of the cursors in Qt
> such as the resizing cursors used by KWin aren't available in that
> file, but will be added to the cursor themes. With your patch
> applied Qt won't be able to use them when that happens.
> Without it it will.

Please note that XCreateFontCursor is called only when _not_ a custom 
cursor is used. Meaning that the custom bitmap cursors are still 
created as they used to. Only all the default cursors are loaded this 
way, which is exactly what this patch tries to achieve - make the 
default cursors Xcursor's. 

> And making Qt call XCreateFontCursor() is just a hack. You're
> replacing a call to one deprecated function with a call to another.
> Qt should call XcursorLibraryLoadCursor() to load the cursors.

Hmm, that might be why I said in my first email that this is a hack :) 
The bottom line right now is that using this hack makes KDE use Xcursors 
and not using it makes KDE display Xcursor's for Xlib and GTK+ 
applications and Qt cursors for KDE application, which looks horribly 
inconsistent and ugly. I'm, of course, not going to apply it to Qt but 
for now this is the only solution.

Zack

-- 
"Science is like sex: sometimes something useful comes out,





More information about the kde-core-devel mailing list