From 8c4b2e65c08ce0814e4d8059fc4df7c731b07ca5 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Wed, 11 Feb 2026 21:31:41 +0100 Subject: fixing atlas init --- src/wayclock.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wayclock.cc b/src/wayclock.cc index 84a188e..e8879f4 100644 --- a/src/wayclock.cc +++ b/src/wayclock.cc @@ -73,12 +73,6 @@ int main() { wayc_defer(wayc_font_deinit(&font)); - struct atlas_s atlas; - if (!wayc_atlas_init(&atlas, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT)) - wayc_panic("Failed to initialize atlas"); - - wayc_defer(wayc_atlas_deinit(&atlas)); - struct eventloop_s loop; if (wayc_eventloop_init(&loop, wayc_handle) != EVENTLOOP_ERROR_NONE) wayc_panic("Failed to initialize event loop"); @@ -109,8 +103,14 @@ int main() { wayc_panic("Failed to initialize renderer"); wayc_defer(wayc_renderer_deinit(&renderer)); - wayc_renderer_use(&renderer); + + struct atlas_s atlas; + if (!wayc_atlas_init(&atlas, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT)) + wayc_panic("Failed to initialize atlas"); + + wayc_defer(wayc_atlas_deinit(&atlas)); + wayc_window_redraw(&window, &loop); struct app_s app = {&renderer, &fctx, &font, &atlas}; -- cgit v1.2.3