diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2011-04-02 19:49:38 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2011-04-02 19:49:38 +0200 |
commit | e03e93fd1bb6f347b13d42796c1f0dada4ca8bb5 (patch) | |
tree | ea4fe16a784b838f2ae3c9486411a1b9af0430bd /xcb.h | |
parent | e7201e2df53e740e364d6d0992a1c6e329909e06 (diff) |
optimization: render to pixmap which is used as background for the window
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.
Diffstat (limited to 'xcb.h')
-rw-r--r-- | xcb.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,7 +4,8 @@ #include <xcb/xcb.h> 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); |