From e2984aa0c6e76d863bc7fa3d1f4beaf28414f331 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 25 Nov 2016 13:21:50 +0200 Subject: [PATCH] Only hide and show the window on fullscreen change if it was visible --- source/graphics/windows/window.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/graphics/windows/window.cpp b/source/graphics/windows/window.cpp index 3f564de..c07fbae 100644 --- a/source/graphics/windows/window.cpp +++ b/source/graphics/windows/window.cpp @@ -114,10 +114,13 @@ void Window::platform_reconfigure(bool fullscreen_changed) if(fullscreen_changed) { - hide(); + bool was_visible = visible; + if(was_visible) + hide(); SetWindowLong(priv->window, GWL_EXSTYLE, exstyle); SetWindowLong(priv->window, GWL_STYLE, style); - show(); + if(was_visible) + show(); } if(options.fullscreen) -- 2.45.2