Bugfix: Fix rendering (needed a flush)

This commit is contained in:
Michael Stapelberg 2009-03-05 20:07:57 +01:00
parent d2d6c0de12
commit 3684abec1a
2 changed files with 5 additions and 4 deletions

View File

@ -89,10 +89,10 @@ int get_unoccupied_y(Workspace *workspace, int col) {
* *
*/ */
void redecorate_window(xcb_connection_t *conn, Client *client) { 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); 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++) for (int rows = 0; rows < r_ws->rows; rows++)
xoffset[rows] = r_ws->rect.x; xoffset[rows] = r_ws->rect.x;
dump_table(conn, r_ws);
/* Go through the whole table and render whats necessary */ /* Go through the whole table and render whats necessary */
for (int cols = 0; cols < r_ws->cols; cols++) for (int cols = 0; cols < r_ws->cols; cols++)
for (int rows = 0; rows < r_ws->rows; rows++) { for (int rows = 0; rows < r_ws->rows; rows++) {

View File

@ -142,7 +142,7 @@ void set_focus(xcb_connection_t *conn, Client *client) {
current_col = client->container->col; current_col = client->container->col;
current_row = client->container->row; 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 */ /* 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_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); //xcb_warp_pointer(conn, XCB_NONE, client->child, 0, 0, 0, 0, 10, 10);