From 1747fde18b3012ab402025f742e59341316bcacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 2 Dec 2014 11:31:07 +0100 Subject: [PATCH] Toplevel does not inherit from KDecorationDefines any more As an intermediate step Client inherits from KDecorationDefines. --- client.cpp | 2 +- client.h | 5 +++-- effects.cpp | 4 ++-- effects.h | 3 ++- toplevel.h | 4 +--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client.cpp b/client.cpp index 8ff7993409..e136f40945 100644 --- a/client.cpp +++ b/client.cpp @@ -279,7 +279,7 @@ Client::Client() ready_for_painting = false; // wait for first damage or sync reply connect(this, &Client::geometryShapeChanged, this, &Client::geometryChanged); - auto signalMaximizeChanged = static_cast(&Client::clientMaximizedStateChanged); + auto signalMaximizeChanged = static_cast(&Client::clientMaximizedStateChanged); connect(this, signalMaximizeChanged, this, &Client::geometryChanged); connect(this, &Client::clientStepUserMovedResized, this, &Client::geometryChanged); connect(this, &Client::clientStartUserMovedResized, this, &Client::moveResizedChanged); diff --git a/client.h b/client.h index 7f763a459d..050c2b3ce3 100644 --- a/client.h +++ b/client.h @@ -23,6 +23,7 @@ along with this program. If not, see . #define KWIN_CLIENT_H // kwin +#include #include "options.h" #include "rules.h" #include "tabgroup.h" @@ -77,7 +78,7 @@ enum class Predicate { }; class Client - : public Toplevel + : public Toplevel, public KDecorationDefines { Q_OBJECT /** @@ -748,7 +749,7 @@ private Q_SLOTS: Q_SIGNALS: void clientManaging(KWin::Client*); void clientFullScreenSet(KWin::Client*, bool, bool); - void clientMaximizedStateChanged(KWin::Client*, KDecorationDefines::MaximizeMode); + void clientMaximizedStateChanged(KWin::Client*, Client::MaximizeMode); void clientMaximizedStateChanged(KWin::Client* c, bool h, bool v); void clientMinimized(KWin::Client* client, bool animate); void clientUnminimized(KWin::Client* client, bool animate); diff --git a/effects.cpp b/effects.cpp index 2b6feff939..368041aef2 100644 --- a/effects.cpp +++ b/effects.cpp @@ -318,7 +318,7 @@ EffectsHandlerImpl::~EffectsHandlerImpl() void EffectsHandlerImpl::setupClientConnections(Client* c) { connect(c, &Client::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed); - connect(c, static_cast(&Client::clientMaximizedStateChanged), + connect(c, static_cast(&Client::clientMaximizedStateChanged), this, &EffectsHandlerImpl::slotClientMaximized); connect(c, &Client::clientStartUserMovedResized, this, [this](Client *c) { @@ -519,7 +519,7 @@ void EffectsHandlerImpl::startPaint() m_currentPaintEffectFrameIterator = m_activeEffects.constBegin(); } -void EffectsHandlerImpl::slotClientMaximized(KWin::Client *c, KDecorationDefines::MaximizeMode maxMode) +void EffectsHandlerImpl::slotClientMaximized(KWin::Client *c, Client::MaximizeMode maxMode) { bool horizontal = false; bool vertical = false; diff --git a/effects.h b/effects.h index 68808f9795..947928ec5e 100644 --- a/effects.h +++ b/effects.h @@ -24,6 +24,7 @@ along with this program. If not, see . #include "kwineffects.h" +#include "client.h" #include "scene.h" #include "xcbutils.h" @@ -235,7 +236,7 @@ protected Q_SLOTS: void slotClientShown(KWin::Toplevel*); void slotUnmanagedShown(KWin::Toplevel*); void slotWindowClosed(KWin::Toplevel *c); - void slotClientMaximized(KWin::Client *c, KDecorationDefines::MaximizeMode maxMode); + void slotClientMaximized(KWin::Client *c, Client::MaximizeMode maxMode); void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity); void slotClientModalityChanged(); void slotGeometryShapeChanged(KWin::Toplevel *t, const QRect &old); diff --git a/toplevel.h b/toplevel.h index 99450b9719..dee58e2172 100644 --- a/toplevel.h +++ b/toplevel.h @@ -21,8 +21,6 @@ along with this program. If not, see . #ifndef KWIN_TOPLEVEL_H #define KWIN_TOPLEVEL_H -// kwin libs -#include // kwin #include "input.h" #include "utils.h" @@ -60,7 +58,7 @@ enum class ReleaseReason { }; class Toplevel - : public QObject, public KDecorationDefines + : public QObject { Q_OBJECT Q_PROPERTY(bool alpha READ hasAlpha CONSTANT)