Commit 523ad8e2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

effects/zoom: Schedule a repaint when window is damaged

This is needed to make per-screen rendering work correctly.

BUG: 431652
parent 54313d32
......@@ -123,6 +123,7 @@ ZoomEffect::ZoomEffect()
timeline.setFrameRange(0, 100);
connect(&timeline, &QTimeLine::frameChanged, this, &ZoomEffect::timelineFrameChanged);
connect(effects, &EffectsHandler::mouseChanged, this, &ZoomEffect::slotMouseChanged);
connect(effects, &EffectsHandler::windowDamaged, this, &ZoomEffect::slotWindowDamaged);
#if HAVE_ACCESSIBILITY
m_accessibilityIntegration = new ZoomAccessibilityIntegration(this);
......@@ -519,6 +520,13 @@ void ZoomEffect::slotMouseChanged(const QPoint& pos, const QPoint& old, Qt::Mous
}
}
void ZoomEffect::slotWindowDamaged()
{
if (zoom != 1.0) {
effects->addRepaintFull();
}
}
void ZoomEffect::moveFocus(const QPoint &point)
{
if (zoom == 1.0)
......
......@@ -84,6 +84,7 @@ private Q_SLOTS:
void slotMouseChanged(const QPoint& pos, const QPoint& old,
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
void slotWindowDamaged();
void recreateTexture();
private:
void showCursor();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment