diff -r e3cacdd636e4 -r f18dc427f86f src/window.c --- a/src/window.c Tue Apr 16 22:20:17 2024 +0200 +++ b/src/window.c Thu Apr 18 21:53:53 2024 +0200 @@ -85,7 +85,7 @@ if (asc_gl_context_initialize(&window->glctx, window->window, &settings->glsettings)) { window->ui = asc_scene_node_empty(); asc_dprintf("Window %u initialized", window->id); - asc_context.active_window = window; + asc_window_active = window; return window; } else { asc_dprintf("Creating GL context failed for window %u", window->id); @@ -102,8 +102,8 @@ if (window->id == 0) return; // this window cannot be active anymore - if (asc_context.active_window == window) { - asc_context.active_window = NULL; + if (asc_window_active == window) { + asc_window_active = NULL; } // destroy all scenes @@ -119,8 +119,8 @@ } // if another window was active, make the other context current again - if (asc_context.active_window != NULL) { - asc_gl_context_activate(&asc_context.active_window->glctx); + if (asc_window_active != NULL) { + asc_gl_context_activate(&asc_window_active->glctx); } // clean the data @@ -129,7 +129,7 @@ } void asc_window_sync(AscWindow* window) { - AscWindow *active_window = asc_context.active_window; + AscWindow *active_window = asc_window_active; if (window != active_window) { asc_window_activate(window); } @@ -159,5 +159,5 @@ void asc_window_activate(AscWindow *window) { asc_gl_context_activate(&window->glctx); - asc_context.active_window = (AscWindow *)window; + asc_window_active = (AscWindow *)window; }