Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/x11integration.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 79 | for (QWindow *w : topLevelWindows) { | |||
---|---|---|---|---|---|
80 | installColorScheme(w); | 80 | installColorScheme(w); | ||
81 | } | 81 | } | ||
82 | } | 82 | } | ||
83 | return false; | 83 | return false; | ||
84 | } | 84 | } | ||
85 | 85 | | |||
86 | void X11Integration::installColorScheme(QWindow *w) | 86 | void X11Integration::installColorScheme(QWindow *w) | ||
87 | { | 87 | { | ||
88 | if (!w->isTopLevel()) { | 88 | if (!w->isTopLevel() || !w->handle() /* e.g. WebEngine's QQuickWindow */) { | ||
89 | return; | 89 | return; | ||
90 | } | 90 | } | ||
91 | static xcb_atom_t atom = XCB_ATOM_NONE; | 91 | static xcb_atom_t atom = XCB_ATOM_NONE; | ||
92 | xcb_connection_t *c = QX11Info::connection(); | 92 | xcb_connection_t *c = QX11Info::connection(); | ||
93 | if (atom == XCB_ATOM_NONE) { | 93 | if (atom == XCB_ATOM_NONE) { | ||
94 | const QByteArray name = QByteArrayLiteral("_KDE_NET_WM_COLOR_SCHEME"); | 94 | const QByteArray name = QByteArrayLiteral("_KDE_NET_WM_COLOR_SCHEME"); | ||
95 | const xcb_intern_atom_cookie_t cookie = xcb_intern_atom(c, false, name.length(), name.constData()); | 95 | const xcb_intern_atom_cookie_t cookie = xcb_intern_atom(c, false, name.length(), name.constData()); | ||
96 | QScopedPointer<xcb_intern_atom_reply_t, QScopedPointerPodDeleter> reply(xcb_intern_atom_reply(c, cookie, nullptr)); | 96 | QScopedPointer<xcb_intern_atom_reply_t, QScopedPointerPodDeleter> reply(xcb_intern_atom_reply(c, cookie, nullptr)); | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |