aboutsummaryrefslogtreecommitdiff
path: root/src/state.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-02-11 00:21:05 +0100
committerFederico Angelilli <code@fedang.net>2024-02-11 00:21:05 +0100
commitf8b372787562aecb2a4a55b336c196f47b5c1b0c (patch)
tree08edce1bd88acdad6b9f2519fa901d359078e44d /src/state.c
parentf459a5088528ecd0a19716ce5a4432c8a86a994a (diff)
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
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c5
1 files changed, 5 insertions, 0 deletions
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;