+xcb_pixmap_t create_bg_pixmap(xcb_connection_t *conn, xcb_screen_t *scr, u_int32_t *resolution, char *color) {
+ xcb_pixmap_t bg_pixmap = xcb_generate_id(conn);
+ xcb_create_pixmap(conn, scr->root_depth, bg_pixmap, scr->root,
+ resolution[0], resolution[1]);
+
+ /* Generate a Graphics Context and fill the pixmap with background color
+ * (for images that are smaller than your screen) */
+ xcb_gcontext_t gc = xcb_generate_id(conn);
+ uint32_t values[] = {get_colorpixel(color)};
+ 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;
+}
+
+xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, char *color, xcb_pixmap_t pixmap) {