aboutsummaryrefslogtreecommitdiffstats
path: root/examples/.clang-tidy
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-01-22 18:42:15 -0500
committerDavid Robillard <d@drobilla.net>2025-01-22 21:22:11 -0500
commitd7b69ead8e7e959b01cf615c5f363fd2a0a6590f (patch)
treeb9e6f015ebd5b8ef357cf85a99f41c28330ad222 /examples/.clang-tidy
parent77f88bd146b1ce10d405c7812bdd2c4d78857bd4 (diff)
downloadpugl-main.tar.gz
pugl-main.tar.bz2
pugl-main.zip
Simplify initial position code and place children at the originHEADmain
The code to find the initial size and position for a view had a lot of duplication, and was inconsistent between platforms. Flaky positioning and attempting to center embedded children has historically caused a bunch of problems in general, particularly since windows can be resized. So, factor out all the initial size and position code so that the logic is in one centralized place used by all platforms, and always position embedded children within their parent at the top/left origin. For top-level windows, the view is centered on its transient parent or the screen (as before). A new platform function puglGetAncestorCenter() is used to do this in general code. Also towards a total separation of position and size, towards support for Wayland, where applications don't dictate their own positions.
Diffstat (limited to 'examples/.clang-tidy')
0 files changed, 0 insertions, 0 deletions