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

WindowUtils: Make areThereAnyAlwaysOnTopWindows() public

This commit is contained in:
reuk 2023-05-03 13:19:35 +01:00
parent ad59f71b99
commit 53bfd5b16d
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
22 changed files with 257 additions and 69 deletions

View file

@ -50,7 +50,7 @@ AlertWindow::AlertWindow (const String& title,
associatedComponent (comp),
desktopScale (comp != nullptr ? Component::getApproximateScaleFactorForComponent (comp) : 1.0f)
{
setAlwaysOnTop (detail::WindowingHelpers::areThereAnyAlwaysOnTopWindows());
setAlwaysOnTop (WindowUtils::areThereAnyAlwaysOnTopWindows());
accessibleMessageLabel.setColour (Label::textColourId, Colours::transparentBlack);
accessibleMessageLabel.setColour (Label::backgroundColourId, Colours::transparentBlack);

View file

@ -39,7 +39,7 @@ CallOutBox::CallOutBox (Component& c, Rectangle<int> area, Component* const pare
}
else
{
setAlwaysOnTop (detail::WindowingHelpers::areThereAnyAlwaysOnTopWindows());
setAlwaysOnTop (WindowUtils::areThereAnyAlwaysOnTopWindows());
updatePosition (area, Desktop::getInstance().getDisplays().getDisplayForRect (area)->userArea);
addToDesktop (ComponentPeer::windowIsTemporary);

View file

@ -92,7 +92,7 @@ public:
setResizable (options.resizable, options.useBottomRightCornerResizer);
setUsingNativeTitleBar (options.useNativeTitleBar);
setAlwaysOnTop (detail::WindowingHelpers::areThereAnyAlwaysOnTopWindows());
setAlwaysOnTop (WindowUtils::areThereAnyAlwaysOnTopWindows());
}
void closeButtonPressed() override

View file

@ -0,0 +1,37 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
Agreement and JUCE Privacy Policy.
End User License Agreement: www.juce.com/juce-7-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
struct WindowUtils
{
WindowUtils() = delete;
/** Returns true if any windows have a z order that is higher than normal. */
static bool areThereAnyAlwaysOnTopWindows();
};
} // namespace juce