fix startup effect repaints
REVIEW: 105376
This commit is contained in:
parent
e868ed8999
commit
adce67d1d7
2 changed files with 10 additions and 6 deletions
|
@ -163,8 +163,8 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
default:
|
default:
|
||||||
break; // nothing
|
break; // nothing
|
||||||
}
|
}
|
||||||
m_currentGeometry = feedbackRect();
|
data.paint.unite(m_dirtyRect);
|
||||||
data.paint.unite(m_currentGeometry);
|
m_dirtyRect = QRect();
|
||||||
}
|
}
|
||||||
effects->prePaintScreen(data, time);
|
effects->prePaintScreen(data, time);
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,8 @@ void StartupFeedbackEffect::postPaintScreen()
|
||||||
case BouncingFeedback: // fall through
|
case BouncingFeedback: // fall through
|
||||||
case BlinkingFeedback:
|
case BlinkingFeedback:
|
||||||
// repaint the icon
|
// repaint the icon
|
||||||
effects->addRepaint(m_currentGeometry);
|
m_dirtyRect = m_currentGeometry;
|
||||||
|
effects->addRepaint(m_dirtyRect);
|
||||||
break;
|
break;
|
||||||
case PassiveFeedback: // fall through
|
case PassiveFeedback: // fall through
|
||||||
default:
|
default:
|
||||||
|
@ -264,8 +265,10 @@ void StartupFeedbackEffect::slotMouseChanged(const QPoint& pos, const QPoint& ol
|
||||||
Q_UNUSED(modifiers)
|
Q_UNUSED(modifiers)
|
||||||
Q_UNUSED(oldmodifiers)
|
Q_UNUSED(oldmodifiers)
|
||||||
if (m_active) {
|
if (m_active) {
|
||||||
effects->addRepaint(m_currentGeometry);
|
m_dirtyRect |= m_currentGeometry;
|
||||||
effects->addRepaint(feedbackRect());
|
m_currentGeometry = feedbackRect();
|
||||||
|
m_dirtyRect |= m_currentGeometry;
|
||||||
|
effects->addRepaint(m_dirtyRect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,6 +311,7 @@ void StartupFeedbackEffect::start(const QString& icon)
|
||||||
if (!m_active)
|
if (!m_active)
|
||||||
effects->startMousePolling();
|
effects->startMousePolling();
|
||||||
m_active = true;
|
m_active = true;
|
||||||
|
m_dirtyRect = m_currentGeometry = feedbackRect();
|
||||||
QPixmap iconPixmap = KIconLoader::global()->loadIcon(icon, KIconLoader::Small, 0,
|
QPixmap iconPixmap = KIconLoader::global()->loadIcon(icon, KIconLoader::Small, 0,
|
||||||
KIconLoader::DefaultState, QStringList(), 0, true); // return null pixmap if not found
|
KIconLoader::DefaultState, QStringList(), 0, true); // return null pixmap if not found
|
||||||
if (iconPixmap.isNull())
|
if (iconPixmap.isNull())
|
||||||
|
|
|
@ -74,7 +74,7 @@ private:
|
||||||
GLTexture* m_bouncingTextures[5];
|
GLTexture* m_bouncingTextures[5];
|
||||||
GLTexture* m_texture; // for passive and blinking
|
GLTexture* m_texture; // for passive and blinking
|
||||||
FeedbackType m_type;
|
FeedbackType m_type;
|
||||||
QRect m_currentGeometry;
|
QRect m_currentGeometry, m_dirtyRect;
|
||||||
GLShader *m_blinkingShader;
|
GLShader *m_blinkingShader;
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in a new issue