]> git.tdb.fi Git - libs/gui.git/commitdiff
Only set resizing flag to true in Window::reconfigure
authorMikko Rasa <tdb@tdb.fi>
Wed, 22 Jan 2014 19:52:21 +0000 (21:52 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 22 Jan 2014 19:52:21 +0000 (21:52 +0200)
This ensures that multiple consecutive reconfigure calls with the same
size won't reset the flag to false and prevent resize signal emission.

source/graphics/window.cpp

index 8c9d1748a199648b3ae5b1e232c99066399c0882..658eb26f5aab722c2b1515a4c64c4f6f9334ec73 100644 (file)
@@ -60,7 +60,8 @@ Window::~Window()
 void Window::reconfigure(const WindowOptions &opts)
 {
        bool fullscreen_changed = (opts.fullscreen!=options.fullscreen);
-       resizing = (opts.width!=options.width || opts.height!=options.height);
+       if(opts.width!=options.width || opts.height!=options.height)
+               resizing = true;
 
        if(visible)
        {