aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-03 17:23:37 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-03 17:23:37 +0000
commitc10f1d5459568d4883e55d3d7531594d6c93066b (patch)
treeccd4ca7f36528e0ada2f3a999d8d278a47e62212 /render.c
parentinput: do a full CSD repaint on pointer motion over CSD buttons (diff)
render: don't try to render CSDs when the terminal is shutting down
Diffstat (limited to 'render.c')
-rw-r--r--render.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/render.c b/render.c
index b422ef93..771cfe64 100644
--- a/render.c
+++ b/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;