Commit 72af932e authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[kstyle] Don't create HiDPI shadows on Wayland

The shadow protocol lacks relevant requests to specify the device pixel
ratio. In addition to that, the difference between scaled shadows and
hidpi shadows is very subtle, so it's not worth spending more computing
resources.
parent 3c70ee66
......@@ -13,6 +13,8 @@
#include "breezepropertynames.h"
#include "breezestyleconfigdata.h"
#include <KWindowSystem>
#include <QDockWidget>
#include <QEvent>
#include <QApplication>
......@@ -212,7 +214,8 @@ namespace Breeze
const QSize boxSize = BoxShadowRenderer::calculateMinimumBoxSize(params.shadow1.radius)
.expandedTo(BoxShadowRenderer::calculateMinimumBoxSize(params.shadow2.radius));
const qreal dpr = qApp->devicePixelRatio();
// On Wayland, the compositor will upscale the shadow tiles if necessary.
const qreal dpr = KWindowSystem::isPlatformWayland() ? 1 : qApp->devicePixelRatio();
const qreal frameRadius = _helper.frameRadius();
BoxShadowRenderer shadowRenderer;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment