]> git.mdlowis.com Git - proto/labwc.git/commit
view: Fix SSD margin computation
authorJohn Lindgren <john@jlindgren.net>
Sun, 27 Nov 2022 03:49:10 +0000 (22:49 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 27 Nov 2022 06:47:56 +0000 (06:47 +0000)
commitcfa51ab6285319250061be5a58c192293ca5031d
tree3df9db721e581c2611e3c43825fe0a2ac12aa3fc
parentb203758ce1eb416d58064dd8ffc1578027e87dbe
view: Fix SSD margin computation

If `view->ssd_enabled` is false when calling `ssd_create()` then
`ssd_thickness()` returns zeroes which are stored in `ssd->margins`.

The quick fix is just to ensure we set `view->ssd_enabled` before
calling `ssd_create()`. At some point, it might be nice to refactor
so that `ssd_create()` does not reference `view->ssd_enabled`.
src/view.c