X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fx11%2Fwindow.cpp;h=32744deb0178a3dc5684b1786c298d8cb3281ae1;hb=27a621a559aea51eec8b9cdadf58f2074c91a072;hp=07ff75588c824ad17ab1cdd22b09572a7cd279de;hpb=95480fceabec2dd6354b87a200b4a219b39d4f0a;p=libs%2Fgui.git diff --git a/source/graphics/x11/window.cpp b/source/graphics/x11/window.cpp index 07ff755..32744de 100644 --- a/source/graphics/x11/window.cpp +++ b/source/graphics/x11/window.cpp @@ -34,9 +34,19 @@ void Window::platform_init() attr.override_redirect = options.fullscreen; attr.event_mask = ButtonPressMask|ButtonReleaseMask|PointerMotionMask|KeyPressMask|KeyReleaseMask|StructureNotifyMask|EnterWindowMask|ExposureMask|FocusChangeMask; + // User position is set when the window is mapped + int x = 0; + int y = 0; + if(options.fullscreen && !options.fullscreen_exclusive) + { + const Monitor::Settings &ms = options.fullscreen_monitor->current_settings; + x = ms.x; + y = ms.y; + } + priv->window = XCreateWindow(dpy, display.get_private().root_window, - 0, 0, // User position is set when the window is mapped + x, y, options.width, options.height, 0, CopyFromParent,