love.window.setMode with resizable flag lacks minimum size constraints
27.5K reputation · 04 Aug 2021, 09:20 UTC
love.window.setMode with resizable flag lacks minimum size constraints
The goal is to allow users to resize a LÖVE window while keeping the rendering surface usable across all possible dimensions.
Currently love.window.setMode(width, height, {resizable=true}) places no lower bound on the reported width and height; the window can be shrunk to 1×1 pixels, which can break drawing and input handling. Developers must manually clamp love.graphics.getWidth() and love.graphics.getHeight() inside love.resize or repeatedly call love.window.setMode to enforce a size policy, but there is no consensus on whether the engine should provide an optional minSize argument or enforce a default minimum.
Should love.window.setMode accept optional minWidth/minHeight parameters? Should the engine automatically clamp dimensions to a developer‑defined minimum? Would adding such constraints affect existing projects that rely on unrestricted resizing?