diff --git a/.gitignore b/.gitignore index ddefe29..3ea57b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.strm vendor/ result snapshots/ diff --git a/.strm/config b/.strm/config deleted file mode 100644 index 9637d8f..0000000 --- a/.strm/config +++ /dev/null @@ -1,8 +0,0 @@ -[remotes] -[remotes.local] -enabled = true -repo = 'sumi' - -[remotes.origin] -enabled = true -repo = 'sumi' diff --git a/.strm/refs/adf/head b/.strm/refs/adf/head deleted file mode 100644 index 77bbc4f..0000000 --- a/.strm/refs/adf/head +++ /dev/null @@ -1 +0,0 @@ -0723fe496ed6c679262e6965dadf4839011f2eb749a529010366a9629f2568d9 \ No newline at end of file diff --git a/.strm/refs/head b/.strm/refs/head deleted file mode 100644 index 77bbc4f..0000000 --- a/.strm/refs/head +++ /dev/null @@ -1 +0,0 @@ -0723fe496ed6c679262e6965dadf4839011f2eb749a529010366a9629f2568d9 \ No newline at end of file diff --git a/.strm/storage/0.efile b/.strm/storage/0.efile deleted file mode 100755 index e69de29..0000000 diff --git a/.strm/storage/0.idx b/.strm/storage/0.idx deleted file mode 100755 index 3efc63b..0000000 Binary files a/.strm/storage/0.idx and /dev/null differ diff --git a/.strm/storage/0.sfile b/.strm/storage/0.sfile deleted file mode 100755 index 2667792..0000000 Binary files a/.strm/storage/0.sfile and /dev/null differ diff --git a/main.go b/main.go index 598f380..f1cdfab 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,13 @@ import ( func Bootstrap() *Env { - rl.InitWindow(800, 600, "bootstrap") + // HiDPI: report logical sizes to layout code while drawing into the full + // framebuffer. Required for correct scaling on Wayland/XWayland mixed-DPI + // setups. Leaving the window non-resizable so tiling WMs (Hyprland) treat + // it as a floating window via fixed min/max size hints. + rl.SetConfigFlags(rl.FlagWindowHighdpi) + + rl.InitWindow(800, 600, "sumi sierpinski arrow") monitor := rl.GetCurrentMonitor() fmt.Printf("Using monitor %d\n", monitor) @@ -59,7 +65,11 @@ func Bootstrap() *Env { controlsWidth := int(float64(windowWidth) * controlsRelWidth) viewportWidth := windowWidth - controlsWidth + // Reopen at the real size so the window's fixed-size hints land on + // Hyprland the first time — avoids a tiling layout being applied and + // the resize flicker from SetWindowSize. rl.CloseWindow() + rl.SetConfigFlags(rl.FlagWindowHighdpi) log.Printf("Storing snapshots at '%s'\n", snapshotsPath) @@ -79,7 +89,6 @@ func Bootstrap() *Env { Offscreen: sg.Rect{X: 0, Y: 0, Width: float32(graphicsWidth), Height: float32(graphicsHeight)}, } - //rl.SetConfigFlags(rl.FlagMsaa4xHint) rl.InitWindow(int32(layout.Window.Width), int32(layout.Window.Height), "sumi sierpinski arrow") rl.SetTargetFPS(30)