X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fwindow.cpp;h=79cfb7d99833029a0827064c5f74bde8fd3f8899;hb=b99a9eb342d0f6ba5509c6d9f8ab0b0b5d5d2979;hp=d27f41fd6fda9980cbf9192329335388e918d8c0;hpb=95480fceabec2dd6354b87a200b4a219b39d4f0a;p=libs%2Fgui.git diff --git a/source/graphics/window.cpp b/source/graphics/window.cpp index d27f41f..79cfb7d 100644 --- a/source/graphics/window.cpp +++ b/source/graphics/window.cpp @@ -1,26 +1,13 @@ -#include -#include "display.h" #include "window.h" #include "window_private.h" +#include +#include "display.h" using namespace std; namespace Msp { namespace Graphics { -WindowOptions::WindowOptions(): - x(0), - y(0), - user_position(false), - width(640), - height(480), - fullscreen(false), - fullscreen_monitor(0), - fullscreen_exclusive(true), - resizable(false) -{ } - - Window::Window(Display &dpy, unsigned w, unsigned h, bool fs): display(dpy) { @@ -40,13 +27,11 @@ Window::Window(Display &dpy, const WindowOptions &opts): void Window::init() { - visible = false; - kbd_autorepeat = true; - touch_input = false; - resizing = false; - moving = false; priv = new Private; + if(options.fullscreen && !options.fullscreen_monitor) + options.fullscreen_monitor = display.get_desktop_mode().monitor; + platform_init(); display.add_window(*this);