X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fx.c;h=9e3e55bc5453ab258333ed1b0553f595b2ae2774;hb=56c284af8e281d9d5657e55b3edb7f7c673fc747;hp=ee638fc26bee0af63e80bcde3d0d00853e1568f1;hpb=92000942039fa99d7334ca5099b467b0d3d17792;p=i3%2Fi3 diff --git a/src/x.c b/src/x.c index ee638fc2..9e3e55bc 100644 --- a/src/x.c +++ b/src/x.c @@ -659,10 +659,18 @@ void x_push_node(Con *con) { con, con->window->id, con->ignore_unmap); } + /* The pixmap of a borderless leaf container will not be used except + * for the titlebar in a stack or tabs (issue #1013). */ + bool is_pixmap_needed = (con->border_style != BS_NONE || + !con_is_leaf(con) || + con->parent->layout == L_STACKED || + con->parent->layout == L_TABBED); + bool fake_notify = false; - /* Set new position if rect changed (and if height > 0) */ - if (memcmp(&(state->rect), &rect, sizeof(Rect)) != 0 && - rect.height > 0) { + /* Set new position if rect changed (and if height > 0) or if the pixmap + * needs to be recreated */ + if ((is_pixmap_needed && con->pixmap == XCB_NONE) || (memcmp(&(state->rect), &rect, sizeof(Rect)) != 0 && + rect.height > 0)) { /* We first create the new pixmap, then render to it, set it as the * background and only afterwards change the window size. This reduces * flickering. */ @@ -673,13 +681,6 @@ void x_push_node(Con *con) { * (height == 0) or when it is not needed. */ bool has_rect_changed = (state->rect.width != rect.width || state->rect.height != rect.height); - /* The pixmap of a borderless leaf container will not be used except - * for the titlebar in a stack or tabs (issue #1013). */ - bool is_pixmap_needed = (con->border_style != BS_NONE || - !con_is_leaf(con) || - con->parent->layout == L_STACKED || - con->parent->layout == L_TABBED); - /* Check if the container has an unneeded pixmap left over from * previously having a border or titlebar. */ if (!is_pixmap_needed && con->pixmap != XCB_NONE) { @@ -687,7 +688,7 @@ void x_push_node(Con *con) { con->pixmap = XCB_NONE; } - if (has_rect_changed && is_pixmap_needed) { + if (is_pixmap_needed && (has_rect_changed || con->pixmap == XCB_NONE)) { if (con->pixmap == 0) { con->pixmap = xcb_generate_id(conn); con->pm_gc = xcb_generate_id(conn); @@ -1140,8 +1141,7 @@ void x_set_i3_atoms(void) { * */ void x_set_warp_to(Rect *rect) { - if (!config.disable_focus_follows_mouse && - config.mouse_warping != POINTER_WARPING_NONE) + if (config.mouse_warping != POINTER_WARPING_NONE) warp_to = rect; }