From e9ef672c3634a6d4cbd82f7ecd99860f030a9224 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 6 Mar 2010 16:34:07 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20render=20if=20no=20stack=5Fwindo?= =?utf8?q?w=20has=20been=20opened?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This could happen when you have only one client in a stacking/tabbed container. While not being a critical bug, this avoids X errors. --- src/layout.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layout.c b/src/layout.c index 31ee404e..ddf79f8a 100644 --- a/src/layout.c +++ b/src/layout.c @@ -529,8 +529,10 @@ void render_container(xcb_connection_t *conn, Container *container) { } offset_x = current_client++ * size_each; } - decorate_window(conn, client, stack_win->pixmap.id, stack_win->pixmap.gc, - offset_x, offset_y); + if (stack_win->pixmap.id == XCB_NONE) + continue; + decorate_window(conn, client, stack_win->pixmap.id, + stack_win->pixmap.gc, offset_x, offset_y); } /* Check if we need to fill one column because of an uneven @@ -557,6 +559,8 @@ void render_container(xcb_connection_t *conn, Container *container) { } } + if (stack_win->pixmap.id == XCB_NONE) + return; xcb_copy_area(conn, stack_win->pixmap.id, stack_win->window, stack_win->pixmap.gc, 0, 0, 0, 0, stack_win->rect.width, stack_win->rect.height); } -- 2.39.5