DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 6876fd08ec9f0d1926158a4b60ed68ce9d33c6d4
parent b9e027eeae8741ece01f80c5d5d1625b58a64eea
Author: falkTX <falktx@falktx.com>
Date:   Sun, 22 Oct 2023 15:46:03 +0200

Add default size workaround for fluxbox

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdgl/src/pugl.cpp | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/dgl/src/pugl.cpp b/dgl/src/pugl.cpp @@ -351,9 +351,19 @@ PuglStatus puglSetSizeAndDefault(PuglView* view, uint width, uint height) if (width > INT16_MAX || height > INT16_MAX) return PUGL_BAD_PARAMETER; +#ifdef DGL_USING_X11 + // workaround issues in fluxbox, see https://github.com/lv2/pugl/issues/118 + if (view->impl->win) + { + view->sizeHints[PUGL_DEFAULT_SIZE].width = view->sizeHints[PUGL_DEFAULT_SIZE].height = 0; + } + else +#endif // set default size first - view->sizeHints[PUGL_DEFAULT_SIZE].width = static_cast<PuglSpan>(width); - view->sizeHints[PUGL_DEFAULT_SIZE].height = static_cast<PuglSpan>(height); + { + view->sizeHints[PUGL_DEFAULT_SIZE].width = static_cast<PuglSpan>(width); + view->sizeHints[PUGL_DEFAULT_SIZE].height = static_cast<PuglSpan>(height); + } #if defined(DISTRHO_OS_HAIKU) #elif defined(DISTRHO_OS_MAC)