x: skip creating pixmaps when the rect is actually invisible
This fixes a few X11 errors.
This commit is contained in:
parent
6419e42f6d
commit
26635a7595
9
src/x.c
9
src/x.c
|
@ -510,9 +510,12 @@ static void x_push_node(Con *con) {
|
||||||
xcb_set_window_rect(conn, con->frame, rect);
|
xcb_set_window_rect(conn, con->frame, rect);
|
||||||
|
|
||||||
/* As the pixmap only depends on the size and not on the position, it
|
/* As the pixmap only depends on the size and not on the position, it
|
||||||
* is enough to check if width/height have changed */
|
* is enough to check if width/height have changed. Also, we don’t
|
||||||
if (state->rect.width != rect.width ||
|
* create a pixmap at all when the window is actually not visible
|
||||||
state->rect.height != rect.height) {
|
* (height == 0). */
|
||||||
|
if (rect.height > 0 &&
|
||||||
|
(state->rect.width != rect.width ||
|
||||||
|
state->rect.height != rect.height)) {
|
||||||
DLOG("CACHE: creating new pixmap\n");
|
DLOG("CACHE: creating new pixmap\n");
|
||||||
if (con->pixmap == 0) {
|
if (con->pixmap == 0) {
|
||||||
con->pixmap = xcb_generate_id(conn);
|
con->pixmap = xcb_generate_id(conn);
|
||||||
|
|
Loading…
Reference in New Issue