Commit 0a82746f authored by Martin Flöser's avatar Martin Flöser

Move decorationHasAlpha from Client to AbstractClient

parent ebe29896
......@@ -1311,4 +1311,13 @@ void AbstractClient::destroyDecoration()
m_decoration = nullptr;
}
bool AbstractClient::decorationHasAlpha() const
{
if (!isDecorated() || decoration()->isOpaque()) {
// either no decoration or decoration has alpha disabled
return false;
}
return true;
}
}
......@@ -200,6 +200,10 @@ class KWIN_EXPORT AbstractClient : public Toplevel
* Notify signal is emitted when the Client starts or ends move/resize mode.
**/
Q_PROPERTY(bool resize READ isResize NOTIFY moveResizedChanged)
/**
* Whether the decoration is currently using an alpha channel.
**/
Q_PROPERTY(bool decorationHasAlpha READ decorationHasAlpha)
public:
virtual ~AbstractClient();
......@@ -491,6 +495,7 @@ public:
bool isDecorated() const {
return m_decoration != nullptr;
}
bool decorationHasAlpha() const;
// TODO: remove boolean trap
static bool belongToSameApplication(const AbstractClient* c1, const AbstractClient* c2, bool active_hack = false);
......
......@@ -2060,15 +2060,6 @@ NET::WindowType Client::windowType(bool direct, int supportedTypes) const
return wt;
}
bool Client::decorationHasAlpha() const
{
if (!isDecorated() || decoration()->isOpaque()) {
// either no decoration or decoration has alpha disabled
return false;
}
return true;
}
void Client::cancelFocusOutTimer()
{
if (m_focusOutTimer) {
......
......@@ -128,10 +128,6 @@ class Client
* Use with care!
**/
Q_PROPERTY(bool blocksCompositing READ isBlockingCompositing WRITE setBlockingCompositing NOTIFY blockingCompositingChanged)
/**
* Whether the decoration is currently using an alpha channel.
**/
Q_PROPERTY(bool decorationHasAlpha READ decorationHasAlpha)
/**
* Whether the Client uses client side window decorations.
* Only GTK+ are detected.
......@@ -358,7 +354,6 @@ public:
QRect transparentRect() const;
bool decorationHasAlpha() const;
bool isClientSideDecorated() const;
bool wantsShadowToBeRendered() const override;
......
Markdown is supported
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