From bf0e0f071cebf9238669ce4352f29cc3f061edcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sat, 15 Jul 2017 18:59:23 +0200 Subject: [PATCH] [aurorae] Add support for shaded windows Summary: Aurorae did not render correctly. This change addresses the problem for both maximized and restored windows. BUG: 373319 FIXED-IN: 5.10.4 Test Plan: shaded windows with Plastik and SVG based theme Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6719 --- plugins/kdecorations/aurorae/src/aurorae.cpp | 2 ++ plugins/kdecorations/aurorae/src/qml/Decoration.qml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/kdecorations/aurorae/src/aurorae.cpp b/plugins/kdecorations/aurorae/src/aurorae.cpp index c2f625d34c..00632c35a0 100644 --- a/plugins/kdecorations/aurorae/src/aurorae.cpp +++ b/plugins/kdecorations/aurorae/src/aurorae.cpp @@ -405,6 +405,7 @@ void Decoration::init() connect(m_extendedBorders, &KWin::Borders::bottomChanged, this, updateExtendedBorders); } connect(client().data(), &KDecoration2::DecoratedClient::maximizedChanged, this, &Decoration::updateBorders, Qt::QueuedConnection); + connect(client().data(), &KDecoration2::DecoratedClient::shadedChanged, this, &Decoration::updateBorders); updateBorders(); if (!m_view.isNull()) { auto resizeWindow = [this] { @@ -418,6 +419,7 @@ void Decoration::init() connect(client().data(), &KDecoration2::DecoratedClient::widthChanged, this, resizeWindow); connect(client().data(), &KDecoration2::DecoratedClient::heightChanged, this, resizeWindow); connect(client().data(), &KDecoration2::DecoratedClient::maximizedChanged, this, resizeWindow); + connect(client().data(), &KDecoration2::DecoratedClient::shadedChanged, this, resizeWindow); resizeWindow(); } else { // create a dummy shadow for the configuration interface diff --git a/plugins/kdecorations/aurorae/src/qml/Decoration.qml b/plugins/kdecorations/aurorae/src/qml/Decoration.qml index 4c858b1d99..849ab66654 100644 --- a/plugins/kdecorations/aurorae/src/qml/Decoration.qml +++ b/plugins/kdecorations/aurorae/src/qml/Decoration.qml @@ -32,5 +32,5 @@ Item { } property bool alpha: true width: decoration.client.width + decoration.borderLeft + decoration.borderRight + (decoration.client.maximized ? 0 : (padding.left + padding.right)) - height: decoration.client.height + decoration.borderTop + decoration.borderBottom + (decoration.client.maximized ? 0 : (padding.top + padding.bottom)) + height: (decoration.client.shaded ? 0 : decoration.client.height) + decoration.borderTop + (decoration.client.shaded ? 0 : decoration.borderBottom) + (decoration.client.maximized ? 0 : (padding.top + padding.bottom)) }