aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c4
-rw-r--r--render.c12
-rw-r--r--terminal.h4
3 files changed, 11 insertions, 9 deletions
diff --git a/main.c b/main.c
index 972f653a..5968a14c 100644
--- a/main.c
+++ b/main.c
@@ -848,8 +848,8 @@ out:
mtx_unlock(&term.kbd.repeat.mutex);
shm_fini();
- if (term.frame_callback != NULL)
- wl_callback_destroy(term.frame_callback);
+ if (term.render.frame_callback != NULL)
+ wl_callback_destroy(term.render.frame_callback);
if (term.wl.xdg_toplevel != NULL)
xdg_toplevel_destroy(term.wl.xdg_toplevel);
if (term.wl.xdg_surface != NULL)
diff --git a/render.c b/render.c
index 33076fc3..29e4eabb 100644
--- a/render.c
+++ b/render.c
@@ -563,9 +563,9 @@ grid_render(struct terminal *term)
cairo_surface_flush(buf->cairo_surface);
wl_surface_attach(term->wl.surface, buf->wl_buf, 0, 0);
- assert(term->frame_callback == NULL);
- term->frame_callback = wl_surface_frame(term->wl.surface);
- wl_callback_add_listener(term->frame_callback, &frame_listener, term);
+ assert(term->render.frame_callback == NULL);
+ term->render.frame_callback = wl_surface_frame(term->wl.surface);
+ wl_callback_add_listener(term->render.frame_callback, &frame_listener, term);
wl_surface_commit(term->wl.surface);
@@ -585,9 +585,9 @@ frame_callback(void *data, struct wl_callback *wl_callback, uint32_t callback_da
{
struct terminal *term = data;
- assert(term->frame_callback == wl_callback);
+ assert(term->render.frame_callback == wl_callback);
wl_callback_destroy(wl_callback);
- term->frame_callback = NULL;
+ term->render.frame_callback = NULL;
grid_render(term);
}
@@ -754,6 +754,6 @@ render_update_cursor_surface(struct terminal *term)
void
render_refresh(struct terminal *term)
{
- if (term->frame_callback == NULL)
+ if (term->render.frame_callback == NULL)
grid_render(term);
}
diff --git a/terminal.h b/terminal.h
index 49a24803..66da13f5 100644
--- a/terminal.h
+++ b/terminal.h
@@ -321,7 +321,9 @@ struct terminal {
cairo_font_extents_t fextents;
struct wayland wl;
- struct wl_callback *frame_callback;
+ struct {
+ struct wl_callback *frame_callback;
+ } render;
};
void term_damage_rows(struct terminal *term, int start, int end);