Use Xlib to resolve font cursor if possible
before fallingback to uploading a bitmap cursor Task-number: QTBUG-30016 Change-Id: I53eeda6bb5f6cab66e3bc10a2e5382ce55cc1bab Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
21d7ec80f0
commit
c7b003ea3b
@ -53,6 +53,12 @@ typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);
|
||||
typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#include <X11/Xlib.h>
|
||||
enum {
|
||||
XCursorShape = CursorShape
|
||||
};
|
||||
#undef CursorShape
|
||||
|
||||
static PtrXcursorLibraryLoadCursor ptrXcursorLibraryLoadCursor = 0;
|
||||
static PtrXcursorLibraryGetTheme ptrXcursorLibraryGetTheme = 0;
|
||||
static PtrXcursorLibrarySetTheme ptrXcursorLibrarySetTheme = 0;
|
||||
@ -552,6 +558,12 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||
}
|
||||
if (cursor)
|
||||
return cursor;
|
||||
if (!cursor && cursorId) {
|
||||
cursor = XCreateFontCursor(DISPLAY_FROM_XCB(this), cursorId);
|
||||
if (cursor)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Non-standard X11 cursors are created from bitmaps
|
||||
|
Loading…
Reference in New Issue
Block a user