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

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() ...@@ -123,6 +123,7 @@ ZoomEffect::ZoomEffect()
timeline.setFrameRange(0, 100); timeline.setFrameRange(0, 100);
connect(&timeline, &QTimeLine::frameChanged, this, &ZoomEffect::timelineFrameChanged); connect(&timeline, &QTimeLine::frameChanged, this, &ZoomEffect::timelineFrameChanged);
connect(effects, &EffectsHandler::mouseChanged, this, &ZoomEffect::slotMouseChanged); connect(effects, &EffectsHandler::mouseChanged, this, &ZoomEffect::slotMouseChanged);
connect(effects, &EffectsHandler::windowDamaged, this, &ZoomEffect::slotWindowDamaged);
#if HAVE_ACCESSIBILITY #if HAVE_ACCESSIBILITY
m_accessibilityIntegration = new ZoomAccessibilityIntegration(this); m_accessibilityIntegration = new ZoomAccessibilityIntegration(this);
...@@ -519,6 +520,13 @@ void ZoomEffect::slotMouseChanged(const QPoint& pos, const QPoint& old, Qt::Mous ...@@ -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) void ZoomEffect::moveFocus(const QPoint &point)
{ {
if (zoom == 1.0) if (zoom == 1.0)
......
...@@ -84,6 +84,7 @@ private Q_SLOTS: ...@@ -84,6 +84,7 @@ private Q_SLOTS:
void slotMouseChanged(const QPoint& pos, const QPoint& old, void slotMouseChanged(const QPoint& pos, const QPoint& old,
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons, Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers); Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
void slotWindowDamaged();
void recreateTexture(); void recreateTexture();
private: private:
void showCursor(); void showCursor();
......
Supports Markdown
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