From 14faa195a6730c0ff531bbef978a5fc9b457dcdf Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 20 May 2021 20:06:35 +0100 Subject: [PATCH] Workaround wrong initial window size Signed-off-by: falkTX --- dgl/src/WindowPrivateData.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp index e7ed92a1..5ed30ba6 100644 --- 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