mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Linux: Fix maximise when not using native titlebar
X11 cannot maximise windows that have their maximum size set. When not using the native titlebar we now revert to setting the window bounds without involving the X11 maximise function.
This commit is contained in:
parent
90ea4cc2ab
commit
e867d1dbb4
1 changed files with 6 additions and 2 deletions
|
|
@ -185,10 +185,14 @@ public:
|
|||
|
||||
if (fullScreen != shouldBeFullScreen)
|
||||
{
|
||||
XWindowSystem::getInstance()->setMaximised (windowH, shouldBeFullScreen);
|
||||
const auto usingNativeTitleBar = ((styleFlags & windowHasTitleBar) != 0);
|
||||
|
||||
if (usingNativeTitleBar)
|
||||
XWindowSystem::getInstance()->setMaximised (windowH, shouldBeFullScreen);
|
||||
|
||||
if (shouldBeFullScreen)
|
||||
r = XWindowSystem::getInstance()->getWindowBounds (windowH, parentWindow);
|
||||
r = usingNativeTitleBar ? XWindowSystem::getInstance()->getWindowBounds (windowH, parentWindow)
|
||||
: Desktop::getInstance().getDisplays().getDisplayForRect (bounds)->userArea;
|
||||
|
||||
if (! r.isEmpty())
|
||||
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, r), shouldBeFullScreen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue