]> git.mdlowis.com Git - proto/labwc.git/commit
view: don't try to restore to very small width/height on unmaximize
authortokyo4j <hrak1529@gmail.com>
Wed, 19 Jun 2024 02:48:39 +0000 (11:48 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 28 Jun 2024 12:07:26 +0000 (14:07 +0200)
commit74e1ba72e3d03d15df5f2f168847ba6ab939cafa
treeda15e5549a1bd84e8c24d7cbbf232e081bf68640
parent3b605b014295c2b6ca693340fcfeec422e64883f
view: don't try to restore to very small width/height on unmaximize

Thonny (Python IDE made with Tk) may set the window geometry to 1x1 and
maximizes the window before mapping. This set `view->natural_geometry`
to 1x1, so labwc tried to restore the window geometry to it on
unmaximize, causing validation errors in `ssd_update_geometry()` as its
width and height are smaller than `LAB_MIN_VIEW_{WIDTH,HEIGHT}`.

This commit fixes it by not allowing geometries smaller than
`LAB_MIN_VIEW_{WIDTH,HEIGHT}` in `view->natural_geometry`.
src/view.c