Skip to content

Commit c3928ab

Browse files
authored
workspace-names: Fix stuck rendering on screen (#283)
The recent port discarded the alpha component, so the workspace names would never disappear. Fix this by using render_transformed_texture().
1 parent c8963d4 commit c3928ab

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/workspace-names.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,16 @@ class simple_node_render_instance_t : public render_instance_t
108108
workspace->rect.width, workspace->rect.height};
109109
if (workspace->texture)
110110
{
111-
data.pass->add_texture(workspace->texture->get_texture(), data.target, g, data.damage);
111+
data.pass->custom_gles_subpass(data.target, [&]
112+
{
113+
wf::gles::bind_render_buffer(data.target);
114+
for (auto& box : data.damage)
115+
{
116+
wf::gles::render_target_logic_scissor(data.target, wlr_box_from_pixman_box(box));
117+
OpenGL::render_texture(wf::gles_texture_t{workspace->texture->get_texture()},
118+
data.target, g, glm::vec4(1, 1, 1, *alpha_fade), 0);
119+
}
120+
});
112121
}
113122
}
114123
};

0 commit comments

Comments
 (0)