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,
{
XSizeHints hints;
hints.flags = PMinSize|PMaxSize;
- hints.min_width=hints.max_width = options.width;
- hints.min_height=hints.max_height = options.height;
+ hints.min_width = hints.max_width = options.width;
+ hints.min_height = hints.max_height = options.height;
XSetWMNormalHints(dpy, priv->window, &hints);
}
}
{
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);
}