mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Avoided re-entrancy in Desktop::getKioskModeComponent
This commit is contained in:
parent
728cc9b40c
commit
c86a3104b2
2 changed files with 7 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ Desktop::Desktop()
|
|||
: mouseSources (new MouseInputSource::SourceList()),
|
||||
mouseClickCounter (0), mouseWheelCounter (0),
|
||||
kioskModeComponent (nullptr),
|
||||
kioskModeReentrant (false),
|
||||
allowedOrientations (allOrientations),
|
||||
masterScaleFactor ((float) getDefaultMasterScale())
|
||||
{
|
||||
|
|
@ -340,6 +341,11 @@ void Desktop::Displays::refresh()
|
|||
//==============================================================================
|
||||
void Desktop::setKioskModeComponent (Component* componentToUse, const bool allowMenusAndBars)
|
||||
{
|
||||
if (kioskModeReentrant)
|
||||
return;
|
||||
|
||||
const ScopedValueSetter<bool> setter (kioskModeReentrant, true, false);
|
||||
|
||||
if (kioskModeComponent != componentToUse)
|
||||
{
|
||||
// agh! Don't delete or remove a component from the desktop while it's still the kiosk component!
|
||||
|
|
|
|||
|
|
@ -426,6 +426,7 @@ private:
|
|||
|
||||
Component* kioskModeComponent;
|
||||
Rectangle<int> kioskComponentOriginalBounds;
|
||||
bool kioskModeReentrant;
|
||||
|
||||
int allowedOrientations;
|
||||
float masterScaleFactor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue