/* XXX: Possible optimization: Only update the area in the middle of the
* screen instead of the whole screen. */
xcb_clear_area(conn, 0, win, 0, 0, scr->width_in_pixels, scr->height_in_pixels);
+ xcb_free_pixmap(conn, bg_pixmap);
xcb_flush(conn);
}
if (img) {
xcb_pixmap_t bg_pixmap = draw_image(vistype, last_resolution);
xcb_change_window_attributes(conn, win, XCB_CW_BACK_PIXMAP, (uint32_t[1]){ bg_pixmap });
+ xcb_free_pixmap(conn, bg_pixmap);
}
#endif
/* open the fullscreen window, already with the correct pixmap in place */
win = open_fullscreen_window(conn, scr, color, bg_pixmap);
+ xcb_free_pixmap(conn, bg_pixmap);
cursor = create_cursor(conn, scr, win, curs_choice);
xcb_create_gc(conn, gc, bg_pixmap, XCB_GC_FOREGROUND, values);
xcb_rectangle_t rect = { 0, 0, resolution[0], resolution[1] };
xcb_poly_fill_rectangle(conn, bg_pixmap, gc, 1, &rect);
+ xcb_free_gc(conn, gc);
return bg_pixmap;
}