Skip to content

Commit

Permalink
Add default size workaround for fluxbox
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 22, 2023
1 parent b9e027e commit 6876fd0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dgl/src/pugl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6876fd0

Please sign in to comment.