diff --git a/qt6/src/qml/overridable/InWindowBlur.qml b/qt6/src/qml/overridable/InWindowBlur.qml index a6eab580a..73f8498a5 100644 --- a/qt6/src/qml/overridable/InWindowBlur.qml +++ b/qt6/src/qml/overridable/InWindowBlur.qml @@ -18,7 +18,7 @@ Item { D.BackdropBlitter { id: blitter anchors.fill: parent - blitterEnabled: !D.DTK.isSoftwareRender && D.DTK.hasInWindowBlur + blitterEnabled: !D.DTK.isSoftwareRender && D.DTK.hasInWindowBlur && D.DTK.isBlurBackendSupported MultiEffect { id: blur diff --git a/src/private/dqmlglobalobject.cpp b/src/private/dqmlglobalobject.cpp index a63d5bd24..5bb623232 100644 --- a/src/private/dqmlglobalobject.cpp +++ b/src/private/dqmlglobalobject.cpp @@ -237,6 +237,21 @@ bool DQMLGlobalObject::isSoftwareRender() return isSoftware; } +// Check whether the current scene graph backend supports InWindowBlur rendering. +// The blur effect requires the OpenGL RHI backend; other backends (e.g. Vulkan, +// Metal, D3D11) are not supported by DBackdropNode's RHI render path and would +// silently fall back to a no-op (reset), leaving a semi-transparent background +// without actual blur. This is distinct from isSoftwareRender(), which only +// detects the explicit "software" backend string. +bool DQMLGlobalObject::isBlurBackendSupported() +{ + static bool supported = []() { + const QString backend = QQuickWindow::sceneGraphBackend(); + return backend.isEmpty() || backend == QLatin1String("opengl"); + }(); + return supported; +} + QString DQMLGlobalObject::windowManagerNameString() const { return DWindowManagerHelper::instance()->windowManagerNameString(); diff --git a/src/private/dqmlglobalobject_p.h b/src/private/dqmlglobalobject_p.h index e2d24d55b..bc7a14eb5 100644 --- a/src/private/dqmlglobalobject_p.h +++ b/src/private/dqmlglobalobject_p.h @@ -122,6 +122,7 @@ class DQMLGlobalObject : public QObject, public DTK_CORE_NAMESPACE::DObject Q_PROPERTY(bool hasAnimation READ hasAnimation NOTIFY hasAnimationChanged) Q_PROPERTY(bool hasInWindowBlur READ hasInWindowBlur NOTIFY hasInWindowBlurChanged) Q_PROPERTY(bool isSoftwareRender READ isSoftwareRender FINAL CONSTANT) + Q_PROPERTY(bool isBlurBackendSupported READ isBlurBackendSupported FINAL CONSTANT) Q_PROPERTY(DTK_GUI_NAMESPACE::DWindowManagerHelper::WMName windowManagerName READ windowManagerName CONSTANT) Q_PROPERTY(DTK_GUI_NAMESPACE::DGuiApplicationHelper::ColorType themeType READ themeType NOTIFY themeTypeChanged) Q_PROPERTY(QString windowManagerNameString READ windowManagerNameString CONSTANT) @@ -188,6 +189,7 @@ class DQMLGlobalObject : public QObject, public DTK_CORE_NAMESPACE::DObject static bool hasAnimation(); static bool hasInWindowBlur(); static bool isSoftwareRender(); + static bool isBlurBackendSupported(); DWindowManagerHelper::WMName windowManagerName() const; QString windowManagerNameString() const;