Browse Source

Workaround wrong initial window size

Signed-off-by: falkTX <falktx@falktx.com>
pull/272/head
falkTX 4 years ago
parent
commit
14faa195a6
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      dgl/src/WindowPrivateData.cpp

+ 5
- 1
dgl/src/WindowPrivateData.cpp View File

@@ -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


Loading…
Cancel
Save