diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-11 09:29:17 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-11 09:29:17 +0200 |
commit | 4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (patch) | |
tree | cc68622c9b85992d99a8373ab55471ee821a4ebf /src/plugins/platforms/xcb/qxcbcursor.cpp | |
parent | ab28ff2207e8f33754c79793089dbf943d67736d (diff) | |
parent | ebb49c66aaf22ed55d62ff7bc3690fce00b7d8ba (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Change-Id: I569a2246c9e8d70430e8c5405b9f3df2218078ee
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbcursor.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbcursor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index a032085f0b..4210bf428e 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -534,6 +534,8 @@ bool updateCursorTheme(void *dpy, const QByteArray &theme) { Q_UNUSED(screen); Q_UNUSED(name); QXcbCursor *self = static_cast<QXcbCursor *>(handle); + self->m_cursorHash.clear(); + updateCursorTheme(self->connection()->xlib_display(),property.toByteArray()); } @@ -559,14 +561,16 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) int cursorId = cursorIdForShape(cshape); xcb_cursor_t cursor = XCB_NONE; - // Try Xcursor first #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) + if (m_screen->xSettings()->initialized()) + m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this); + + // Try Xcursor first if (cshape >= 0 && cshape <= Qt::LastCursor) { void *dpy = connection()->xlib_display(); cursor = loadCursor(dpy, cshape); if (!cursor && !m_gtkCursorThemeInitialized && m_screen->xSettings()->initialized()) { QByteArray gtkCursorTheme = m_screen->xSettings()->setting("Gtk/CursorThemeName").toByteArray(); - m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this); if (updateCursorTheme(dpy,gtkCursorTheme)) { cursor = loadCursor(dpy, cshape); } |