Fix white/black flash on Windows/macOS when showing a new native window

This commit is contained in:
David Capello 2021-05-31 11:11:33 -03:00
parent d79c193e40
commit fffca9e969
2 changed files with 6 additions and 2 deletions

2
laf

@ -1 +1 @@
Subproject commit c0b6457dd05a33c927110e793a8769c03146558e
Subproject commit 8448a77df095d9d58339039572102fd330025afd

View File

@ -60,7 +60,11 @@ void Display::flipDisplay()
if (!m_dirtyRegion.isEmpty()) {
// Invalidate the dirty region in the os::Window
m_nativeWindow->invalidateRegion(m_dirtyRegion);
if (m_nativeWindow->isVisible())
m_nativeWindow->invalidateRegion(m_dirtyRegion);
else
m_nativeWindow->setVisible(true);
m_dirtyRegion.clear();
}
}