Move decorationHasAlpha from Client to AbstractClient
This commit is contained in:
parent
ebe2989649
commit
0a82746f91
4 changed files with 14 additions and 14 deletions
|
@ -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) {
|
||||
|
|
5
client.h
5
client.h
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue