1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

AudioPluginHost: Call setUsingNativeTitleBar() before restoreWindowStateFromString()

Since the window borders are unknown for a short time after window creation on
Linux, restoreWindowStateFromString() needs to adjust the restored position
before passing it on to the XWindow system.

The adjustment is dependent on whether we use the native or the JUCE titlebar.
Hence the adjustment can only be correct if the titlebar configuration has
already happened before calling restoreWindowStateFromString().
This commit is contained in:
attila 2021-11-26 17:52:40 +01:00
parent a7811661c5
commit 454ff64631
2 changed files with 2 additions and 1 deletions

View file

@ -160,7 +160,6 @@ public:
appProperties->setStorageParameters (options);
mainWindow.reset (new MainHostWindow());
mainWindow->setUsingNativeTitleBar (true);
commandManager.registerAllCommandsForTarget (this);
commandManager.registerAllCommandsForTarget (mainWindow.get());

View file

@ -300,6 +300,8 @@ MainHostWindow::MainHostWindow()
setContentNonOwned (graphHolder.get(), false);
setUsingNativeTitleBar (true);
restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("mainWindowPos"));
setVisible (true);