Browse Source

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().
v6.1.6
attila 3 years ago
parent
commit
454ff64631
2 changed files with 2 additions and 1 deletions
  1. +0
    -1
      extras/AudioPluginHost/Source/HostStartup.cpp
  2. +2
    -0
      extras/AudioPluginHost/Source/UI/MainHostWindow.cpp

+ 0
- 1
extras/AudioPluginHost/Source/HostStartup.cpp View File

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


+ 2
- 0
extras/AudioPluginHost/Source/UI/MainHostWindow.cpp View File

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


Loading…
Cancel
Save