8 Star 0 Fork 18

src-anolis-os/qt5-qtbase

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
QTBUG-94538-fix-cursorTheme-update-issue.patch 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-10-13 02:47 . !8feature: add patchs for DDE
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);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/qt5-qtbase.git
git@gitee.com:src-anolis-os/qt5-qtbase.git
src-anolis-os
qt5-qtbase
qt5-qtbase
a8

搜索帮助