src/window.c

changeset 298
fa91e2e06eee
parent 295
c72df1f06671
--- a/src/window.c	Sun Jan 25 19:45:24 2026 +0100
+++ b/src/window.c	Sun Feb 01 13:52:50 2026 +0100
@@ -146,9 +146,13 @@
     // necessary safeguard
     if (window->id == 0) return;
 
-    // activate the window that shall be synced temporarily
+    // activate the window that shall be synced
     unsigned int active_index = asc_window_activate(index);
 
+    // copy and reset the counters
+    memcpy(&asc_active_glctx->counters, &asc_active_glctx->ctr, sizeof(AscGLCounters));
+    memset(&asc_active_glctx->ctr, 0, sizeof(AscGLCounters));
+
     // Clear the color buffer for the window frame
     glViewport(0, 0,
         (GLsizei) window->rect.size.width,

mercurial