Qt/RenderWidget: Fix the render widget showing up when it shouldn't

This commit is contained in:
spycrab 2018-04-22 13:01:18 +02:00
parent 50e80d66db
commit 519fa7529f
1 changed files with 4 additions and 1 deletions

View File

@ -75,10 +75,13 @@ void RenderWidget::OnHideCursorChanged()
void RenderWidget::OnKeepOnTopChanged(bool top)
{
const bool was_visible = isVisible();
setWindowFlags(top ? windowFlags() | Qt::WindowStaysOnTopHint :
windowFlags() & ~Qt::WindowStaysOnTopHint);
show();
if (was_visible)
show();
}
void RenderWidget::HandleCursorTimer()