]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/window.cpp
Allow configuring window positions as well
[libs/gui.git] / source / graphics / window.cpp
index d2fb37f893d23379a1df46914b175f3a7312bdc5..d116b691c14bcbf11592bca91d9edcb647eca792 100644 (file)
@@ -9,6 +9,9 @@ namespace Msp {
 namespace Graphics {
 
 WindowOptions::WindowOptions():
+       x(0),
+       y(0),
+       user_position(false),
        width(640),
        height(480),
        fullscreen(false),
@@ -39,6 +42,7 @@ void Window::init()
        kbd_autorepeat = true;
        touch_input = false;
        resizing = false;
+       moving = false;
        priv = new Private;
 
        platform_init();
@@ -68,6 +72,8 @@ void Window::reconfigure(const WindowOptions &opts)
        bool fullscreen_changed = (opts.fullscreen!=options.fullscreen);
        if(opts.width!=options.width || opts.height!=options.height)
                resizing = true;
+       if(opts.x!=options.x || opts.y!=options.y)
+               moving = true;
 
        if(visible)
        {