diff --git a/effects.h b/effects.h --- a/effects.h +++ b/effects.h @@ -59,7 +59,6 @@ class Toplevel; class Unmanaged; class WindowPropertyNotifyX11Filter; -class X11Client; class KWIN_EXPORT EffectsHandlerImpl : public EffectsHandler { @@ -308,8 +307,7 @@ void connectNotify(const QMetaMethod &signal) override; void disconnectNotify(const QMetaMethod &signal) override; void effectsChanged(); - void setupAbstractClientConnections(KWin::AbstractClient *c); - void setupClientConnections(KWin::X11Client *c); + void setupClientConnections(KWin::AbstractClient *client); void setupUnmanagedConnections(KWin::Unmanaged *u); /** diff --git a/effects.cpp b/effects.cpp --- a/effects.cpp +++ b/effects.cpp @@ -181,7 +181,7 @@ ); connect(ws, &Workspace::internalClientAdded, this, [this](InternalClient *client) { - setupAbstractClientConnections(client); + setupClientConnections(client); emit windowAdded(client->effectWindow()); } ); @@ -255,7 +255,7 @@ setupUnmanagedConnections(u); } for (InternalClient *client : ws->internalClients()) { - setupAbstractClientConnections(client); + setupClientConnections(client); } if (auto w = waylandServer()) { connect(w, &WaylandServer::shellClientAdded, this, [this](AbstractClient *c) { @@ -267,7 +267,7 @@ const auto clients = waylandServer()->clients(); for (AbstractClient *c : clients) { if (c->readyForPainting()) { - setupAbstractClientConnections(c); + setupClientConnections(c); } else { connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotWaylandClientShown); } @@ -293,7 +293,7 @@ effectsChanged(); } -void EffectsHandlerImpl::setupAbstractClientConnections(AbstractClient* c) +void EffectsHandlerImpl::setupClientConnections(AbstractClient* c) { connect(c, &AbstractClient::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed); connect(c, static_cast(&AbstractClient::clientMaximizedStateChanged), @@ -334,6 +334,7 @@ connect(c, &AbstractClient::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged); connect(c, &AbstractClient::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged); connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged); + connect(c, &AbstractClient::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged); connect(c, &AbstractClient::unresponsiveChanged, this, [this, c](bool unresponsive) { emit windowUnresponsiveChanged(c->effectWindow(), unresponsive); @@ -368,12 +369,6 @@ ); } -void EffectsHandlerImpl::setupClientConnections(X11Client *c) -{ - setupAbstractClientConnections(c); - connect(c, &X11Client::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged); -} - void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u) { connect(u, &Unmanaged::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed); @@ -579,7 +574,7 @@ void EffectsHandlerImpl::slotWaylandClientShown(Toplevel *toplevel) { AbstractClient *client = static_cast(toplevel); - setupAbstractClientConnections(client); + setupClientConnections(client); emit windowAdded(toplevel->effectWindow()); }