mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
render: don't try to render CSDs when the terminal is shutting down
This commit is contained in:
parent
264acd6463
commit
c10f1d5459
1 changed files with 9 additions and 1 deletions
10
render.c
10
render.c
|
|
@ -736,6 +736,9 @@ render_csd_title(struct terminal *term)
|
|||
if (term->window->use_csd != CSD_YES)
|
||||
return;
|
||||
|
||||
if (term->is_shutting_down)
|
||||
return;
|
||||
|
||||
struct csd_data info = get_csd_data(term, CSD_SURF_TITLE);
|
||||
struct wl_surface *surf = term->window->csd.surface[CSD_SURF_TITLE];
|
||||
|
||||
|
|
@ -756,7 +759,6 @@ render_csd_title(struct terminal *term)
|
|||
pixman_color_t color = color_hex_to_pixman_with_alpha(_color, alpha);
|
||||
if (!term->visual_focus)
|
||||
pixman_color_dim(&color);
|
||||
|
||||
render_csd_part(term, surf, buf, info.width, info.height, &color);
|
||||
csd_commit(term, surf, buf);
|
||||
}
|
||||
|
|
@ -843,6 +845,9 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx)
|
|||
if (term->window->use_csd != CSD_YES)
|
||||
return;
|
||||
|
||||
if (term->is_shutting_down)
|
||||
return;
|
||||
|
||||
struct csd_data info = get_csd_data(term, surf_idx);
|
||||
struct wl_surface *surf = term->window->csd.surface[surf_idx];
|
||||
|
||||
|
|
@ -921,6 +926,9 @@ render_csd(struct terminal *term)
|
|||
if (term->window->use_csd != CSD_YES)
|
||||
return;
|
||||
|
||||
if (term->is_shutting_down)
|
||||
return;
|
||||
|
||||
for (size_t i = 0; i < CSD_SURF_COUNT; i++) {
|
||||
struct csd_data info = get_csd_data(term, i);
|
||||
const int x = info.x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue