Don’t flicker on startup: render on expose
All QWindow implementations must produce a frame before returning from the expose event. Change-Id: I5640809c47e948101879c1623c12230fa0a63c44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
6ca65dd97d
commit
24961cb18c
@ -93,6 +93,8 @@ HelloWindow::HelloWindow(const QSharedPointer<Renderer> &renderer, QScreen *scre
|
|||||||
void HelloWindow::exposeEvent(QExposeEvent *)
|
void HelloWindow::exposeEvent(QExposeEvent *)
|
||||||
{
|
{
|
||||||
m_renderer->setAnimating(this, isExposed());
|
m_renderer->setAnimating(this, isExposed());
|
||||||
|
if (isExposed())
|
||||||
|
m_renderer->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelloWindow::mousePressEvent(QMouseEvent *)
|
void HelloWindow::mousePressEvent(QMouseEvent *)
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
void setAnimating(HelloWindow *window, bool animating);
|
void setAnimating(HelloWindow *window, bool animating);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void render();
|
void render();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user