mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
Fix background image flashing when closing a tab
Ensure the correct vertex array object is bound when calling draw_bgimage. Before this fix it was order dependent on draw calls. Fixes #7999
This commit is contained in:
@@ -91,6 +91,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Wayland: Fix :opt:`background_opacity` less than one causing flicker on startup when the Wayland compositor supports single pixel buffers (:iss:`7987`)
|
- Wayland: Fix :opt:`background_opacity` less than one causing flicker on startup when the Wayland compositor supports single pixel buffers (:iss:`7987`)
|
||||||
|
|
||||||
|
- Fix background image flashing when closing a tab (:iss:`7999`)
|
||||||
|
|
||||||
0.36.4 [2024-09-27]
|
0.36.4 [2024-09-27]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -1092,6 +1092,7 @@ draw_borders(ssize_t vao_idx, unsigned int num_border_rects, BorderRect *rect_bu
|
|||||||
float background_opacity = w->is_semi_transparent ? w->background_opacity: 1.0f;
|
float background_opacity = w->is_semi_transparent ? w->background_opacity: 1.0f;
|
||||||
float tint_opacity = background_opacity;
|
float tint_opacity = background_opacity;
|
||||||
float tint_premult = background_opacity;
|
float tint_premult = background_opacity;
|
||||||
|
bind_vertex_array(vao_idx);
|
||||||
if (has_bgimage(w)) {
|
if (has_bgimage(w)) {
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
BLEND_ONTO_OPAQUE;
|
BLEND_ONTO_OPAQUE;
|
||||||
@@ -1103,7 +1104,6 @@ draw_borders(ssize_t vao_idx, unsigned int num_border_rects, BorderRect *rect_bu
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (num_border_rects) {
|
if (num_border_rects) {
|
||||||
bind_vertex_array(vao_idx);
|
|
||||||
bind_program(BORDERS_PROGRAM);
|
bind_program(BORDERS_PROGRAM);
|
||||||
if (rect_data_is_dirty) {
|
if (rect_data_is_dirty) {
|
||||||
const size_t sz = sizeof(BorderRect) * num_border_rects;
|
const size_t sz = sizeof(BorderRect) * num_border_rects;
|
||||||
@@ -1127,9 +1127,9 @@ draw_borders(ssize_t vao_idx, unsigned int num_border_rects, BorderRect *rect_bu
|
|||||||
else { BLEND_ONTO_OPAQUE_WITH_OPAQUE_OUTPUT; }
|
else { BLEND_ONTO_OPAQUE_WITH_OPAQUE_OUTPUT; }
|
||||||
}
|
}
|
||||||
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, num_border_rects);
|
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, num_border_rects);
|
||||||
unbind_vertex_array();
|
|
||||||
unbind_program();
|
unbind_program();
|
||||||
}
|
}
|
||||||
|
unbind_vertex_array();
|
||||||
if (has_bgimage(w)) glDisable(GL_BLEND);
|
if (has_bgimage(w)) glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user