Skip to content

Commit

Permalink
Fix for Plasma 5.25 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve authored Jun 17, 2022
1 parent 44c02fb commit 0af28c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/slidingnotificationseffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,7 @@ void SlidingNotificationsEffect::prePaintWindow(EffectWindow *window, WindowPreP
auto it = m_animations.find(window);
if (it != m_animations.end()) {
data.setTransformed();
if (window->isDeleted()) {
window->enablePainting(EffectWindow::PAINT_DISABLED_BY_DELETE);
}

if (!it->lastTimestamp) {
it->lastTimestamp = presentTime;
}
it->timeline.update(presentTime - it->lastTimestamp.value());
it->lastTimestamp = presentTime;
it->timeline.advance(presentTime);
}

effects->prePaintWindow(window, data, presentTime);
Expand Down Expand Up @@ -174,6 +166,7 @@ void SlidingNotificationsEffect::slotWindowClosed(EffectWindow *window)
forceContrastEffect(window);

SlideAnimation animation;
animation.visibleRef = KWin::EffectWindowVisibleRef(window, EffectWindow::PAINT_DISABLED_BY_DELETE);
animation.timeline.setEasingCurve(m_slideOutCurve);
animation.timeline.setDuration(m_slideDuration);

Expand Down
2 changes: 1 addition & 1 deletion src/slidingnotificationseffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ using namespace KWin; // sue me...
class SlideAnimation
{
public:
std::optional<std::chrono::milliseconds> lastTimestamp;
TimeLine timeline;
KWin::EffectWindowVisibleRef visibleRef;

QRect clip;
QPointF startOffset;
Expand Down

0 comments on commit 0af28c1

Please sign in to comment.