Expose frameGeometryChanged signal to effects
Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D26864
This commit is contained in:
parent
15af09c70a
commit
00f4f88f65
3 changed files with 18 additions and 0 deletions
10
effects.cpp
10
effects.cpp
|
@ -334,6 +334,7 @@ void EffectsHandlerImpl::setupAbstractClientConnections(AbstractClient* c)
|
|||
);
|
||||
connect(c, &AbstractClient::modalChanged, this, &EffectsHandlerImpl::slotClientModalityChanged);
|
||||
connect(c, &AbstractClient::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged);
|
||||
connect(c, &AbstractClient::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged);
|
||||
connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
|
||||
connect(c, &AbstractClient::unresponsiveChanged, this,
|
||||
[this, c](bool unresponsive) {
|
||||
|
@ -380,6 +381,7 @@ void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
|||
connect(u, &Unmanaged::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed);
|
||||
connect(u, &Unmanaged::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged);
|
||||
connect(u, &Unmanaged::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged);
|
||||
connect(u, &Unmanaged::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged);
|
||||
connect(u, &Unmanaged::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged);
|
||||
connect(u, &Unmanaged::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
|
||||
}
|
||||
|
@ -637,6 +639,14 @@ void EffectsHandlerImpl::slotGeometryShapeChanged(Toplevel* t, const QRect& old)
|
|||
emit windowGeometryShapeChanged(t->effectWindow(), old);
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::slotFrameGeometryChanged(Toplevel *toplevel, const QRect &oldGeometry)
|
||||
{
|
||||
// effectWindow() might be nullptr during tear down of the client.
|
||||
if (toplevel->effectWindow()) {
|
||||
emit windowFrameGeometryChanged(toplevel->effectWindow(), oldGeometry);
|
||||
}
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::slotPaddingChanged(Toplevel* t, const QRect& old)
|
||||
{
|
||||
// during late cleanup effectWindow() may be already NULL
|
||||
|
|
|
@ -303,6 +303,7 @@ protected Q_SLOTS:
|
|||
void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity);
|
||||
void slotClientModalityChanged();
|
||||
void slotGeometryShapeChanged(KWin::Toplevel *t, const QRect &old);
|
||||
void slotFrameGeometryChanged(Toplevel *toplevel, const QRect &oldGeometry);
|
||||
void slotPaddingChanged(KWin::Toplevel *t, const QRect &old);
|
||||
void slotWindowDamaged(KWin::Toplevel *t, const QRect& r);
|
||||
|
||||
|
|
|
@ -1519,6 +1519,13 @@ Q_SIGNALS:
|
|||
* @since 4.7
|
||||
*/
|
||||
void windowGeometryShapeChanged(KWin::EffectWindow *w, const QRect &old);
|
||||
/**
|
||||
* This signal is emitted when the frame geometry of a window changed.
|
||||
* @param window The window whose geometry changed
|
||||
* @param oldGeometry The previous geometry
|
||||
* @since 5.19
|
||||
*/
|
||||
void windowFrameGeometryChanged(KWin::EffectWindow *window, const QRect &oldGeometry);
|
||||
/**
|
||||
* Signal emitted when the padding of a window changed. (eg. shadow size)
|
||||
* @param w The window whose geometry changed
|
||||
|
|
Loading…
Reference in a new issue