代码拉取完成,页面将自动刷新
From: Tang Haixiang <tanghaixiang@uniontech.com>
Date: Fri, Jun 24 09:24:30 2021 +0800
Subject: fix cursorTheme update issue
Upstream: https://codereview.qt-project.org/c/qt/qtbase/+/354674
Index: qtbase-opensource-src/src/plugins/platforms/xcb/qxcbcursor.cpp
===================================================================
--- qtbase-opensource-src.orig/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ qtbase-opensource-src/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -533,6 +533,8 @@ bool updateCursorTheme(void *dpy, const
Q_UNUSED(screen);
Q_UNUSED(name);
QXcbCursor *self = static_cast<QXcbCursor *>(handle);
+ self->m_cursorHash.clear();
+
updateCursorTheme(self->connection()->xlib_display(),property.toByteArray());
}
@@ -558,14 +560,17 @@ xcb_cursor_t QXcbCursor::createFontCurso
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);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。