From f8b372787562aecb2a4a55b336c196f47b5c1b0c Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 11 Feb 2024 00:21:05 +0100 Subject: Use updated text in draw There is a caveat: The text should always have the same size and layout as the original one for which the pango layout was calculated --- src/state.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index 0debb1f..e8ddbe0 100644 --- a/src/state.c +++ b/src/state.c @@ -21,6 +21,11 @@ void state_add_button(State *state, Button *btn) state->btns = g_list_append(state->btns, btn); } +void state_remove_button(State *state, Button *btn) +{ + state->btns = g_list_remove(state->btns, btn); +} + static gboolean redraw_and_layout(gpointer data) { State *state = data; -- cgit v1.2.3