From 8497832a8bf088a9011052841a50863ab40bf062 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Mon, 20 Aug 2018 13:35:45 +0300 Subject: [PATCH] [DialogShadows] Use 0 offset for disabled borders on Wayland Summary: On Wayland, DialogShadows doesn't attach empty tiles for disabled borders. Yet, it sets offset of 1 for them. This results in visual artifacts like this {F6206088, layout=center, size=full} //KWin thinks that there is 1px tall shadow in the bottom.// In general we don't need to pass empty shadow tiles for disabled borders. Thus, that's fine to set 0 offset for them. Test Plan: * Started kwin_wayland: dbus-launch kwin_wayland --windowed --xwayland * Launched latte-dock and kate: unset DISPLAY QT_QPA_PLATFORM=wayland latte-dock & QT_QPA_PLATFORM=wayland kate * Opened calendar popup: {F6206090, layout=center, size=full} Reviewers: davidedmundson Reviewed By: davidedmundson Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D14946 --- src/plasmaquick/dialogshadows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plasmaquick/dialogshadows.cpp b/src/plasmaquick/dialogshadows.cpp index e9b17f709..5dd88622a 100644 --- a/src/plasmaquick/dialogshadows.cpp +++ b/src/plasmaquick/dialogshadows.cpp @@ -611,7 +611,7 @@ void DialogShadows::Private::updateShadowWayland(const QWindow *window, Plasma:: } QSize marginHint; - QMarginsF margins = QMarginsF(1, 1, 1, 1); + QMarginsF margins; if (enabledBorders & Plasma::FrameSvg::TopBorder) { marginHint = q->elementSize(QStringLiteral("shadow-hint-top-margin")); if (marginHint.isValid()) {