git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit35a91d0d9c7034e36410b4aad5f1694dde262585
parenta5c07bcc3a
authorLucas Galante <[email protected]>
date2026-08-18 08:21
fix: a grid app keeps its current size on a you-choose configure

The 0x0 fallback resized to the settings size, bouncing the grid
surface between 640x480 and its patch size — swapchain thrash worth
gigabytes. A grid app's size belongs to its patches; the compositor's
"you choose" now leaves it untouched once a real size exists.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/backend/window_runner.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index 329a124..094d261 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -3694,6 +3694,12 @@ impl<A: Application> WindowHandler for EngineState<A> {
             self.frame_logical = (width as f32 / f, height as f32 / f);
             self.applied_margin = m;
             self.resize(width as f32 / f + m, height as f32 / f + m);
+        } else if self.inner.as_ref().unwrap().grid() && self.logical_width > 1.0 {
+            // A grid app's size belongs to its PATCHES: the compositor's
+            // "you choose" 0x0 must not bounce the surface back to the
+            // settings size — that thrash recreated multi-hundred-MB
+            // swapchains per bounce (6.3G peak in 10s). Keep the current
+            // size; the next grid_patch is the only resizer.
         } else {
             let settings = self.inner.as_ref().unwrap().settings();
             self.frame_logical = (settings.width as f32, settings.height as f32);