From: Mikko Rasa Date: Fri, 25 Nov 2016 11:21:50 +0000 (+0200) Subject: Only hide and show the window on fullscreen change if it was visible X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=commitdiff_plain;h=e2984aa0c6e76d863bc7fa3d1f4beaf28414f331 Only hide and show the window on fullscreen change if it was visible --- 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)