]> git.tdb.fi Git - libs/gui.git/commitdiff
Only hide and show the window on fullscreen change if it was visible
authorMikko Rasa <tdb@tdb.fi>
Fri, 25 Nov 2016 11:21:50 +0000 (13:21 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 25 Nov 2016 11:21:50 +0000 (13:21 +0200)
source/graphics/windows/window.cpp

index 3f564dec68ef5a28221bd8c20691f0e37370f7f8..c07fbae671bd511693ca249b92f5307253cbce22 100644 (file)
@@ -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)