Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/x11integration.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 53 | if (event->type() == QEvent::Show && watched->inherits("QShapedPixmapWindow")) { | |||
---|---|---|---|---|---|
55 | QWindow *w = static_cast<QWindow *>(watched); | 55 | QWindow *w = static_cast<QWindow *>(watched); | ||
56 | NETWinInfo info(QX11Info::connection(), w->winId(), QX11Info::appRootWindow(), NET::WMWindowType, NET::Properties2()); | 56 | NETWinInfo info(QX11Info::connection(), w->winId(), QX11Info::appRootWindow(), NET::WMWindowType, NET::Properties2()); | ||
57 | info.setWindowType(NET::DNDIcon); | 57 | info.setWindowType(NET::DNDIcon); | ||
58 | // TODO: does this flash the xcb connection? | 58 | // TODO: does this flash the xcb connection? | ||
59 | } | 59 | } | ||
60 | if (event->type() == QEvent::PlatformSurface) { | 60 | if (event->type() == QEvent::PlatformSurface) { | ||
61 | if (QWindow *w = qobject_cast<QWindow*>(watched)) { | 61 | if (QWindow *w = qobject_cast<QWindow*>(watched)) { | ||
62 | QPlatformSurfaceEvent *pe = static_cast<QPlatformSurfaceEvent*>(event); | 62 | QPlatformSurfaceEvent *pe = static_cast<QPlatformSurfaceEvent*>(event); | ||
63 | if (!w->flags().testFlag(Qt::ForeignWindow)) { | ||||
63 | if (pe->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) { | 64 | if (pe->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) { | ||
64 | if (qApp->property(s_schemePropertyName).isValid()) { | 65 | if (qApp->property(s_schemePropertyName).isValid()) { | ||
65 | installColorScheme(w); | 66 | installColorScheme(w); | ||
66 | } | 67 | } | ||
67 | const auto blurBehindProperty = w->property(s_blurBehindPropertyName.constData()); | 68 | const auto blurBehindProperty = w->property(s_blurBehindPropertyName.constData()); | ||
68 | if (blurBehindProperty.isValid()) { | 69 | if (blurBehindProperty.isValid()) { | ||
69 | KWindowEffects::enableBlurBehind(w->winId(), blurBehindProperty.toBool()); | 70 | KWindowEffects::enableBlurBehind(w->winId(), blurBehindProperty.toBool()); | ||
70 | } | 71 | } | ||
71 | installDesktopFileName(w); | 72 | installDesktopFileName(w); | ||
72 | } | 73 | } | ||
73 | } | 74 | } | ||
74 | } | 75 | } | ||
76 | } | ||||
75 | if (event->type() == QEvent::ApplicationPaletteChange) { | 77 | if (event->type() == QEvent::ApplicationPaletteChange) { | ||
76 | const auto topLevelWindows = QGuiApplication::topLevelWindows(); | 78 | const auto topLevelWindows = QGuiApplication::topLevelWindows(); | ||
77 | for (QWindow *w : topLevelWindows) { | 79 | for (QWindow *w : topLevelWindows) { | ||
78 | installColorScheme(w); | 80 | installColorScheme(w); | ||
79 | } | 81 | } | ||
80 | } | 82 | } | ||
81 | return false; | 83 | return false; | ||
82 | } | 84 | } | ||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |