From e03e93fd1bb6f347b13d42796c1f0dada4ca8bb5 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 2 Apr 2011 19:49:38 +0200 Subject: optimization: render to pixmap which is used as background for the window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, the background color (white by default) was visible for about 100ms until the image was drawn. This flickering is now eliminated. Also, we don’t need to handle Expose-events anymore, as X11 will use the window’s background pixmap automatically. --- xcb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xcb.h') diff --git a/xcb.h b/xcb.h index bae51b2..3c6469e 100644 --- a/xcb.h +++ b/xcb.h @@ -4,7 +4,8 @@ #include xcb_visualtype_t *get_root_visual_type(xcb_screen_t *s); -xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, char *color); +xcb_pixmap_t create_bg_pixmap(xcb_connection_t *conn, xcb_screen_t *scr, char *color); +xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, char *color, xcb_pixmap_t pixmap); void grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb_cursor_t cursor); uint32_t get_mod_mask(xcb_connection_t *conn, xcb_key_symbols_t *symbols, uint32_t keycode); void dpms_turn_off_screen(xcb_connection_t *conn); -- cgit v1.1