X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fx11%2Fwindow.cpp;h=0b9eacb41187f138153b71674b26b7ebdd0daa41;hb=1d0d0b91c1df8b563d1f8817e042ebdc06762236;hp=07ff75588c824ad17ab1cdd22b09572a7cd279de;hpb=95480fceabec2dd6354b87a200b4a219b39d4f0a;p=libs%2Fgui.git diff --git a/source/graphics/x11/window.cpp b/source/graphics/x11/window.cpp index 07ff755..0b9eacb 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, @@ -172,7 +182,7 @@ void Window::platform_show() { DisplayHandle dpy = display.get_private().display; XMapRaised(dpy, priv->window); - if(options.user_position) + if(options.user_position && !options.fullscreen) XMoveWindow(dpy, priv->window, options.x, options.y); }