Map window/its decoration *after* calling render_layout()

Thus, no more flickering because the window was first mapped and then
moved. Especially users of multiple monitors should be happy now ;-).
Rather radical change, though, so be prepared for problems.
This commit is contained in:
Michael Stapelberg
2009-07-25 22:29:28 +02:00
parent ce501c9de9
commit 163c9ad7db
7 changed files with 24 additions and 22 deletions

View File

@ -90,7 +90,7 @@ uint32_t get_colorpixel(xcb_connection_t *conn, char *hex) {
*
*/
xcb_window_t create_window(xcb_connection_t *conn, Rect dims, uint16_t window_class, int cursor,
uint32_t mask, uint32_t *values) {
bool map, uint32_t mask, uint32_t *values) {
xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
xcb_window_t result = xcb_generate_id(conn);
xcb_cursor_t cursor_id = xcb_generate_id(conn);
@ -121,7 +121,8 @@ xcb_window_t create_window(xcb_connection_t *conn, Rect dims, uint16_t window_cl
xcb_change_window_attributes(conn, result, XCB_CW_CURSOR, &cursor_id);
/* Map the window (= make it visible) */
xcb_map_window(conn, result);
if (map)
xcb_map_window(conn, result);
return result;
}