if (nc->geometry.width == 0)
nc->geometry = (Rect) {geom->x, geom->y, geom->width, geom->height};
- if (want_floating) {
- DLOG("geometry = %d x %d\n", nc->geometry.width, nc->geometry.height);
- floating_enable(nc, true);
- }
-
if (motif_border_style != BS_NORMAL) {
DLOG("MOTIF_WM_HINTS specifies decorations (border_style = %d)\n", motif_border_style);
if (want_floating) {
}
}
+ if (want_floating) {
+ DLOG("geometry = %d x %d\n", nc->geometry.width, nc->geometry.height);
+ /* automatically set the border to the default value if a motif border
+ * was not specified */
+ bool automatic_border = (motif_border_style == BS_NORMAL);
+
+ floating_enable(nc, automatic_border);
+ }
+
+ /* explicitly set the border width to the default */
+ nc->current_border_width = (want_floating ? config.default_floating_border_width : config.default_border_width);
+
/* to avoid getting an UnmapNotify event due to reparenting, we temporarily
* declare no interest in any state change event of this window */
values[0] = XCB_NONE;
/* Defer setting focus after the 'new' event has been sent to ensure the
* proper window event sequence. */
- if (set_focus) {
+ if (set_focus && !nc->window->doesnt_accept_focus && nc->mapped) {
DLOG("Now setting focus.\n");
con_focus(nc);
}