DPF

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

commit 14faa195a6730c0ff531bbef978a5fc9b457dcdf
parent 4efdece239087ab0580e065acbb45652512901e3
Author: falkTX <falktx@falktx.com>
Date:   Thu, 20 May 2021 20:06:08 +0100

Workaround wrong initial window size

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

Diffstat:
Mdgl/src/WindowPrivateData.cpp | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp @@ -207,7 +207,6 @@ void Window::PrivateData::init(const uint width, const uint height, const bool r rect.width = width; rect.height = height; puglSetFrame(view, rect); - puglSetWindowSize(view, width, height); // FIXME this is bad puglRealize(view); @@ -245,6 +244,11 @@ void Window::PrivateData::show() isClosed = false; appData->oneWindowShown(); + // FIXME + PuglRect rect = puglGetFrame(view); + puglSetDefaultSize(view, rect.width, rect.height); + puglSetWindowSize(view, rect.width, rect.height); + #ifdef DISTRHO_OS_WINDOWS puglWin32ShowWindowCentered(view); #else