From 789d714ed76df094bd34f5db0a84060061443de4 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 23 Jun 2025 13:40:05 -0400 Subject: usr.bin: kfgwm: Allocate new windows with malloc() As malloc() has been recently introduced into the Hyra libc, we should take advantage of it to allow us to share windows between functions without relying on the stack. Signed-off-by: Ian Moffett --- usr.bin/kfgwm/include/kfg/window.h | 1 + 1 file changed, 1 insertion(+) (limited to 'usr.bin/kfgwm/include/kfg') diff --git a/usr.bin/kfgwm/include/kfg/window.h b/usr.bin/kfgwm/include/kfg/window.h index 781c2a5..a597969 100644 --- a/usr.bin/kfgwm/include/kfg/window.h +++ b/usr.bin/kfgwm/include/kfg/window.h @@ -61,6 +61,7 @@ struct kfg_text { kfgpos_t y; }; +struct kfg_window *kfg_win_new(struct kfg_window *parent, kfgpos_t x, kfgpos_t y); int kfg_win_draw(struct kfg_window *parent, struct kfg_window *wp); int kfg_win_putstr(struct kfg_window *wp, struct kfg_text *tp); -- cgit v1.2.3