X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Flayout.c;h=89c561eae83ab79a3071769ea46db477cc19c216;hb=9db8535b4cd55702bbdf0fd005882b469a989e4f;hp=e70d0f49682217376d50d1512d87217eda3030d4;hpb=07bebdf84169621732456c23f07f40421b12e781;p=i3%2Fi3 diff --git a/src/layout.c b/src/layout.c index e70d0f49..89c561ea 100644 --- a/src/layout.c +++ b/src/layout.c @@ -188,6 +188,11 @@ void reposition_client(xcb_connection_t *conn, Client *client) { if (client->workspace->screen == (screen = get_screen_containing(client->rect.x, client->rect.y))) return; + if (screen == NULL) { + LOG("Boundary checking disabled, no screen found for (%d, %d)\n", client->rect.x, client->rect.y); + return; + } + LOG("Client is on workspace %p with screen %p\n", client->workspace, client->workspace->screen); LOG("but screen at %d, %d is %p\n", client->rect.x, client->rect.y, screen); floating_assign_to_workspace(client, &workspaces[screen->current_workspace]); @@ -357,6 +362,9 @@ void render_container(xcb_connection_t *conn, Container *container) { xcb_configure_window(conn, stack_win->window, mask, values); } + /* Prepare the pixmap for usage */ + cached_pixmap_prepare(conn, &(stack_win->pixmap)); + /* Render the decorations of all clients */ CIRCLEQ_FOREACH(client, &(container->clients), clients) { /* If the client is in fullscreen mode, it does not get reconfigured */ @@ -379,9 +387,12 @@ void render_container(xcb_connection_t *conn, Container *container) { client->force_reconfigure = false; - decorate_window(conn, client, stack_win->window, stack_win->gc, + decorate_window(conn, client, stack_win->pixmap.id, stack_win->pixmap.gc, current_client++ * decoration_height); } + + 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); } }