plugins/slidingpopups: adopt input panels from when they're added
Now that they will be shown and hidden in the proper state, we can set up the input panel slide as the window gets added and ignore the geometry changes that it will have in its lifetime.
This commit is contained in:
parent
b1bd3ff630
commit
0eb02c8b2c
2 changed files with 3 additions and 12 deletions
|
@ -211,7 +211,6 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow *w)
|
|||
|
||||
void SlidingPopupsEffect::setupSlideData(EffectWindow *w)
|
||||
{
|
||||
connect(w, &EffectWindow::windowFrameGeometryChanged, this, &SlidingPopupsEffect::slotWindowFrameGeometryChanged);
|
||||
connect(w, &EffectWindow::windowHiddenChanged, this, &SlidingPopupsEffect::slotWindowHiddenChanged);
|
||||
|
||||
#if KWIN_BUILD_X11
|
||||
|
@ -222,7 +221,9 @@ void SlidingPopupsEffect::setupSlideData(EffectWindow *w)
|
|||
#endif
|
||||
|
||||
// Wayland
|
||||
if (auto surf = w->surface()) {
|
||||
if (effects->inputPanel() == w) {
|
||||
setupInputPanelSlide();
|
||||
} else if (auto surf = w->surface()) {
|
||||
slotWaylandSlideOnShowChanged(w);
|
||||
connect(surf, &SurfaceInterface::slideOnShowHideChanged, this, [this, surf] {
|
||||
slotWaylandSlideOnShowChanged(effects->findWindow(surf));
|
||||
|
@ -343,13 +344,6 @@ void SlidingPopupsEffect::slotPropertyNotify(EffectWindow *w, long atom)
|
|||
}
|
||||
#endif
|
||||
|
||||
void SlidingPopupsEffect::slotWindowFrameGeometryChanged(EffectWindow *w, const QRectF &)
|
||||
{
|
||||
if (w == effects->inputPanel()) {
|
||||
setupInputPanelSlide();
|
||||
}
|
||||
}
|
||||
|
||||
void SlidingPopupsEffect::setupAnimData(EffectWindow *w)
|
||||
{
|
||||
const QRectF screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
|
||||
|
@ -501,8 +495,6 @@ void SlidingPopupsEffect::setupInputPanelSlide()
|
|||
animData.slideOutDuration = m_slideOutDuration;
|
||||
|
||||
setupAnimData(w);
|
||||
|
||||
slideIn(w);
|
||||
}
|
||||
|
||||
bool SlidingPopupsEffect::eventFilter(QObject *watched, QEvent *event)
|
||||
|
|
|
@ -58,7 +58,6 @@ private Q_SLOTS:
|
|||
void slotPropertyNotify(EffectWindow *w, long atom);
|
||||
#endif
|
||||
void slotWaylandSlideOnShowChanged(EffectWindow *w);
|
||||
void slotWindowFrameGeometryChanged(EffectWindow *w, const QRectF &);
|
||||
void slotWindowHiddenChanged(EffectWindow *w);
|
||||
|
||||
void slideIn(EffectWindow *w);
|
||||
|
|
Loading…
Reference in a new issue