From 8c8098a61c8990076f6d0866d662ab7980e49dc7 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Jun 2021 17:56:55 +0300 Subject: [PATCH] Move X11Client::wantsShadowToBeRendered to AbstractClient Otherwise only X11 windows will lose server-side drop-shadows when the maximized mode changes. BUG: 434213 --- src/abstract_client.cpp | 5 +++++ src/abstract_client.h | 1 + src/x11client.cpp | 5 ----- src/x11client.h | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp index d0e011db9b..b25856b7f6 100644 --- a/src/abstract_client.cpp +++ b/src/abstract_client.cpp @@ -3770,4 +3770,9 @@ void AbstractClient::cleanTabBox() #endif } +bool AbstractClient::wantsShadowToBeRendered() const +{ + return !isFullScreen() && maximizeMode() != MaximizeFull; +} + } diff --git a/src/abstract_client.h b/src/abstract_client.h index 2622b61b60..f0495c668e 100644 --- a/src/abstract_client.h +++ b/src/abstract_client.h @@ -747,6 +747,7 @@ public: void processDecorationMove(const QPoint &localPos, const QPoint &globalPos); bool processDecorationButtonPress(QMouseEvent *event, bool ignoreMenu = false); void processDecorationButtonRelease(QMouseEvent *event); + bool wantsShadowToBeRendered() const override; /** * TODO: fix boolean traps diff --git a/src/x11client.cpp b/src/x11client.cpp index 2b37fc70da..2da24ac27d 100644 --- a/src/x11client.cpp +++ b/src/x11client.cpp @@ -1349,11 +1349,6 @@ void X11Client::checkNoBorder() setNoBorder(app_noborder); } -bool X11Client::wantsShadowToBeRendered() const -{ - return !isFullScreen() && maximizeMode() != MaximizeFull; -} - void X11Client::updateShape() { if (shape()) { diff --git a/src/x11client.h b/src/x11client.h index 00e313eccf..c0312366bc 100644 --- a/src/x11client.h +++ b/src/x11client.h @@ -259,7 +259,6 @@ public: QRect transparentRect() const override; bool isClientSideDecorated() const; - bool wantsShadowToBeRendered() const override; void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const override;