From 3684abec1a9d925aff0a38e98cf1b8b1f71d8172 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 5 Mar 2009 20:07:57 +0100 Subject: [PATCH] Bugfix: Fix rendering (needed a flush) --- src/layout.c | 7 ++++--- src/util.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/layout.c b/src/layout.c index 7994b7fc..0c9279a1 100644 --- a/src/layout.c +++ b/src/layout.c @@ -89,10 +89,10 @@ int get_unoccupied_y(Workspace *workspace, int col) { * */ void redecorate_window(xcb_connection_t *conn, Client *client) { - if (client->container->mode == MODE_STACK) { + if (client->container->mode == MODE_STACK) render_container(conn, client->container); - xcb_flush(conn); - } else decorate_window(conn, client, client->frame, client->titlegc, 0); + else decorate_window(conn, client, client->frame, client->titlegc, 0); + xcb_flush(conn); } /* @@ -431,6 +431,7 @@ void render_layout(xcb_connection_t *conn) { for (int rows = 0; rows < r_ws->rows; rows++) xoffset[rows] = r_ws->rect.x; + dump_table(conn, r_ws); /* Go through the whole table and render what’s necessary */ for (int cols = 0; cols < r_ws->cols; cols++) for (int rows = 0; rows < r_ws->rows; rows++) { diff --git a/src/util.c b/src/util.c index d1542324..bbca7ce6 100644 --- a/src/util.c +++ b/src/util.c @@ -142,7 +142,7 @@ void set_focus(xcb_connection_t *conn, Client *client) { current_col = client->container->col; current_row = client->container->row; - printf("set_focus(frame %08x, child %08x)\n", client->frame, client->child); + printf("set_focus(frame %08x, child %08x, name %s)\n", client->frame, client->child, client->name); /* Set focus to the entered window, and flush xcb buffer immediately */ xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, client->child, XCB_CURRENT_TIME); //xcb_warp_pointer(conn, XCB_NONE, client->child, 0, 0, 0, 0, 10, 10); -- 2.39.5