diff --git a/src/platformtheme/x11integration.cpp b/src/platformtheme/x11integration.cpp --- a/src/platformtheme/x11integration.cpp +++ b/src/platformtheme/x11integration.cpp @@ -60,15 +60,17 @@ if (event->type() == QEvent::PlatformSurface) { if (QWindow *w = qobject_cast(watched)) { QPlatformSurfaceEvent *pe = static_cast(event); - if (pe->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) { - if (qApp->property(s_schemePropertyName).isValid()) { - installColorScheme(w); + if (!w->flags().testFlag(Qt::ForeignWindow)) { + if (pe->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) { + if (qApp->property(s_schemePropertyName).isValid()) { + installColorScheme(w); + } + const auto blurBehindProperty = w->property(s_blurBehindPropertyName.constData()); + if (blurBehindProperty.isValid()) { + KWindowEffects::enableBlurBehind(w->winId(), blurBehindProperty.toBool()); + } + installDesktopFileName(w); } - const auto blurBehindProperty = w->property(s_blurBehindPropertyName.constData()); - if (blurBehindProperty.isValid()) { - KWindowEffects::enableBlurBehind(w->winId(), blurBehindProperty.toBool()); - } - installDesktopFileName(w); } } }