lv2 / pugl

A minimal portable API for embeddable GUIs
https://gitlab.com/lv2/pugl/
ISC License
179 stars 34 forks source link

Enable puglSetPositionHint prior puglRealize #99

Closed sjaehn closed 1 year ago

sjaehn commented 1 year ago

puglSetPositionHint() was without any effect if called prior puglRealize(). The main reason was that the "use the default position" condition in getInitialFrame() wasn't fulfilled and thus not used. The fallback for this was the window center algorithm which caused clipping in the majority of the LV2 hosts. And I just started to use the new position hints.

I made changes as discussed in #98. Win and mac edits were mainly copy/pasted from x11 but not tested.

I know you are currently working on this drafted branch. Feel free to take it, or get inspiration, or do something else with it.

drobilla commented 1 year ago

Thanks, although the (usual) way I'm working on that branch isn't really compatible with literally merging this (or anything). The current version incorporates most of the things here, if slightly differently.