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:
parent
ad59f71b99
commit
53bfd5b16d
22 changed files with 257 additions and 69 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public:
|
|||
setResizable (options.resizable, options.useBottomRightCornerResizer);
|
||||
|
||||
setUsingNativeTitleBar (options.useNativeTitleBar);
|
||||
setAlwaysOnTop (detail::WindowingHelpers::areThereAnyAlwaysOnTopWindows());
|
||||
setAlwaysOnTop (WindowUtils::areThereAnyAlwaysOnTopWindows());
|
||||
}
|
||||
|
||||
void closeButtonPressed() override
|
||||
|
|
|
|||
37
modules/juce_gui_basics/windows/juce_WindowUtils.h
Normal file
37
modules/juce_gui_basics/windows/juce_WindowUtils.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue