diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index e3e49584..46768aab 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -1504,6 +1504,7 @@ struct render_list_constructor_data { struct wl_array *render_list; bool calculate_visibility; bool highlight_transparent_region; + bool fractional_scale; }; static bool construct_render_list_iterator(struct wlr_scene_node *node, @@ -1514,10 +1515,12 @@ static bool construct_render_list_iterator(struct wlr_scene_node *node, return false; } - // while rendering, the background should always be black. - // If we see a black rect, we can ignore rendering everything under the rect - // and even the rect itself. - if (node->type == WLR_SCENE_NODE_RECT && data->calculate_visibility) { + // While rendering, the background should always be black. If we see a + // black rect, we can ignore rendering everything under the rect, and + // unless fractional scale is used even the rect itself (to avoid running + // into issues regarding damage region expansion). + if (node->type == WLR_SCENE_NODE_RECT && data->calculate_visibility && + (!data->fractional_scale || data->render_list->size == 0)) { struct wlr_scene_rect *rect = wlr_scene_rect_from_node(node); float *black = (float[4]){ 0.f, 0.f, 0.f, 1.f }; @@ -1773,6 +1776,7 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output, .render_list = &scene_output->render_list, .calculate_visibility = scene_output->scene->calculate_visibility, .highlight_transparent_region = scene_output->scene->highlight_transparent_region, + .fractional_scale = floor(render_data.scale) != render_data.scale, }; list_con.render_list->size = 0;