clear surface on x_push_node (#4577)

This commit is contained in:
André Silva 2022-03-28 09:18:55 +01:00 committed by GitHub
parent 41cd852f2f
commit dba30fc987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
avoid graphics artifacts when changing the layout tree by initializing surfaces to all black

View File

@ -1002,6 +1002,7 @@ void x_push_node(Con *con) {
xcb_create_pixmap(conn, win_depth, con->frame_buffer.id, con->frame.id, width, height);
draw_util_surface_init(conn, &(con->frame_buffer), con->frame_buffer.id,
get_visualtype_by_id(get_visualid_by_depth(win_depth)), width, height);
draw_util_clear_surface(&(con->frame_buffer), (color_t){.red = 0.0, .green = 0.0, .blue = 0.0});
/* For the graphics context, we disable GraphicsExposure events.
* Those will be sent when a CopyArea request cannot be fulfilled