diff --git a/abstract_client.h b/abstract_client.h index 2f44c8dd1e..05bd4768f3 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -372,6 +372,8 @@ Q_SIGNALS: void clientUnminimized(KWin::AbstractClient* client, bool animate); void paletteChanged(const QPalette &p); void captionChanged(); + void clientMaximizedStateChanged(KWin::AbstractClient*, MaximizeMode); + void clientMaximizedStateChanged(KWin::AbstractClient* c, bool h, bool v); protected: AbstractClient(); diff --git a/client.cpp b/client.cpp index 55da060978..81fd2aa5e6 100644 --- a/client.cpp +++ b/client.cpp @@ -171,7 +171,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 698599d621..e07c9227f0 100644 --- a/client.h +++ b/client.h @@ -559,8 +559,6 @@ private Q_SLOTS: Q_SIGNALS: void clientManaging(KWin::Client*); void clientFullScreenSet(KWin::Client*, bool, bool); - void clientMaximizedStateChanged(KWin::Client*, MaximizeMode); - void clientMaximizedStateChanged(KWin::Client* c, bool h, bool v); void clientStartUserMovedResized(KWin::Client*); void clientStepUserMovedResized(KWin::Client *, const QRect&); void clientFinishUserMovedResized(KWin::Client*); diff --git a/effects.cpp b/effects.cpp index 6b73b087d4..82269acdd5 100644 --- a/effects.cpp +++ b/effects.cpp @@ -339,7 +339,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) { @@ -540,7 +540,7 @@ void EffectsHandlerImpl::startPaint() m_currentPaintEffectFrameIterator = m_activeEffects.constBegin(); } -void EffectsHandlerImpl::slotClientMaximized(KWin::Client *c, MaximizeMode maxMode) +void EffectsHandlerImpl::slotClientMaximized(KWin::AbstractClient *c, MaximizeMode maxMode) { bool horizontal = false; bool vertical = false; diff --git a/effects.h b/effects.h index f3ad2e1ea8..d50d690dd9 100644 --- a/effects.h +++ b/effects.h @@ -237,7 +237,7 @@ protected Q_SLOTS: void slotShellClientShown(KWin::Toplevel*); void slotUnmanagedShown(KWin::Toplevel*); void slotWindowClosed(KWin::Toplevel *c); - void slotClientMaximized(KWin::Client *c, MaximizeMode maxMode); + void slotClientMaximized(KWin::AbstractClient *c, MaximizeMode maxMode); void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity); void slotClientModalityChanged(); void slotGeometryShapeChanged(KWin::Toplevel *t, const QRect &old); diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index c718a95242..cae42922e4 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -248,7 +248,8 @@ void WorkspaceWrapper::setupClientConnections(KWin::Client *client) connect(client, &Client::clientUnminimized, this, &WorkspaceWrapper::clientUnminimized); connect(client, SIGNAL(clientManaging(KWin::Client*)), SIGNAL(clientManaging(KWin::Client*))); connect(client, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool))); - connect(client, SIGNAL(clientMaximizedStateChanged(KWin::Client*,bool,bool)), SIGNAL(clientMaximizeSet(KWin::Client*,bool,bool))); + connect(client, static_cast(&Client::clientMaximizedStateChanged), + this, &WorkspaceWrapper::clientMaximizeSet); } void WorkspaceWrapper::showOutline(const QRect &geometry) diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index bd48aa0187..5a6c2cbf71 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -96,7 +96,7 @@ Q_SIGNALS: void clientMinimized(KWin::AbstractClient *client); void clientUnminimized(KWin::AbstractClient *client); void clientRestored(KWin::Client *client); - void clientMaximizeSet(KWin::Client *client, bool h, bool v); + void clientMaximizeSet(KWin::AbstractClient *client, bool h, bool v); void killWindowCalled(KWin::Client *client); void clientActivated(KWin::AbstractClient *client); void clientFullScreenSet(KWin::Client *client, bool fullScreen, bool user);