Bugfix: restore the original width/height with X11 border when restarting (Thanks Merovius)
This commit is contained in:
parent
f34b045619
commit
b6f81fe43c
|
@ -55,7 +55,11 @@ void restore_geometry() {
|
||||||
Con *con;
|
Con *con;
|
||||||
TAILQ_FOREACH(con, &all_cons, all_cons)
|
TAILQ_FOREACH(con, &all_cons, all_cons)
|
||||||
if (con->window) {
|
if (con->window) {
|
||||||
DLOG("placing window at %d %d\n", con->rect.x, con->rect.y);
|
DLOG("Re-adding X11 border of %d px\n", con->border_width);
|
||||||
|
con->window_rect.width += (2 * con->border_width);
|
||||||
|
con->window_rect.height += (2 * con->border_width);
|
||||||
|
xcb_set_window_rect(conn, con->window->id, con->window_rect);
|
||||||
|
DLOG("placing window %08x at %d %d\n", con->window->id, con->rect.x, con->rect.y);
|
||||||
xcb_reparent_window(conn, con->window->id, root,
|
xcb_reparent_window(conn, con->window->id, root,
|
||||||
con->rect.x, con->rect.y);
|
con->rect.x, con->rect.y);
|
||||||
}
|
}
|
||||||
|
@ -154,6 +158,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
|
||||||
LOG("this window is a dock\n");
|
LOG("this window is a dock\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DLOG("Initial geometry: (%d, %d, %d, %d)\n", geom->x, geom->y, geom->width, geom->height);
|
||||||
|
|
||||||
Con *nc;
|
Con *nc;
|
||||||
Match *match;
|
Match *match;
|
||||||
|
|
|
@ -140,6 +140,7 @@ void render_con(Con *con, bool render_fullscreen) {
|
||||||
*inset = rect_add(*inset, con_border_style_rect(con));
|
*inset = rect_add(*inset, con_border_style_rect(con));
|
||||||
|
|
||||||
/* Obey x11 border */
|
/* Obey x11 border */
|
||||||
|
DLOG("X11 border: %d\n", con->border_width);
|
||||||
inset->width -= (2 * con->border_width);
|
inset->width -= (2 * con->border_width);
|
||||||
inset->height -= (2 * con->border_width);
|
inset->height -= (2 * con->border_width);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue