floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.54k stars 469 forks source link

Will you accept a PR that allows setting minimum width/height for resizable windows? #1012

Open medvednikov opened 3 months ago

medvednikov commented 3 months ago

Quite a useful feature, would be nice to have it upstream.

floooh commented 3 months ago

Yes if the code isn't too gnarly. Probably best to look at glfwSetWindowSizeLimits() (although tbh, the GLFW code isn't too straightforward at first glance for X11 and Win32).

I'm not sure if it's better to have fixed limits provided in sapp_desc, or a function sapp_set_window_size_limits(), or both.

medvednikov commented 3 months ago

I added min_width and min_height to sapp_desc.

floooh commented 3 months ago

Sounds good!