summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/RenderWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinQt2/RenderWidget.cpp')
-rw-r--r--Source/Core/DolphinQt2/RenderWidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/RenderWidget.cpp b/Source/Core/DolphinQt2/RenderWidget.cpp
index b1c1529baa..c2bbec0d4b 100644
--- a/Source/Core/DolphinQt2/RenderWidget.cpp
+++ b/Source/Core/DolphinQt2/RenderWidget.cpp
@@ -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()