Skip to content

Commit

Permalink
X11 constrainer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Nov 10, 2023
1 parent cf2bab6 commit 346978c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Source/PluginMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,19 @@ class PluginMode : public Component {
mainWindow->setUsingNativeTitleBar(true);
}
editor->constrainer.setSizeLimits(850, 650, 99000, 99000);
#if JUCE_LINUX
OSUtils::updateX11Constraints(getPeer()->getNativeHandle());
#endif

auto correctedPosition = windowBounds.getTopLeft() - Point<int>(0, nativeTitleBarHeight);
mainWindow->setBoundsConstrained(windowBounds.withPosition(correctedPosition));
} else {
editor->pluginConstrainer.setSizeLimits(850, 650, 99000, 99000);
editor->setBounds(windowBounds);
}

#if JUCE_LINUX
OSUtils::updateX11Constraints(getPeer()->getNativeHandle());
OSUtils::updateX11Constraints(getPeer()->getNativeHandle());
#endif
editor->setBounds(windowBounds);
}

if (auto* tabbar = editor->getActiveTabbar()) {
tabbar->resized();
Expand Down

0 comments on commit 346978c

Please sign in to comment.