diff --git a/modules/juce_core/native/juce_mac_Threads.mm b/modules/juce_core/native/juce_mac_Threads.mm index a98e995102..eabb87fa2b 100644 --- a/modules/juce_core/native/juce_mac_Threads.mm +++ b/modules/juce_core/native/juce_mac_Threads.mm @@ -38,6 +38,13 @@ bool Process::isForegroundProcess() #endif } +void Process::makeForegroundProcess() +{ + #if JUCE_MAC + [NSApp activateIgnoringOtherApps: YES]; + #endif +} + void Process::raisePrivilege() { jassertfalse; diff --git a/modules/juce_core/threads/juce_Process.h b/modules/juce_core/threads/juce_Process.h index 717b77face..2320bc25c0 100644 --- a/modules/juce_core/threads/juce_Process.h +++ b/modules/juce_core/threads/juce_Process.h @@ -72,6 +72,11 @@ public: */ static bool isForegroundProcess(); + /** Attempts to make the current process the active one. + (This is not possible on some platforms). + */ + static void makeForegroundProcess(); + //============================================================================== /** Raises the current process's privilege level. diff --git a/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h b/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h index ecfef6f888..30ca729435 100644 --- a/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h +++ b/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h @@ -112,9 +112,7 @@ public: } /** Selects an item. - If the item is already selected, no change notification will be sent out. - @see selectOnly, addToSelectionBasedOnModifiers */ void addToSelection (ParameterType item) @@ -248,7 +246,6 @@ public: //============================================================================== /** Returns the number of currently selected items. - @see getSelectedItem */ int getNumSelected() const noexcept @@ -257,9 +254,7 @@ public: } /** Returns one of the currently selected items. - Returns 0 if the index is out-of-range. - @see getNumSelected */ SelectableItemType getSelectedItem (const int index) const noexcept @@ -290,8 +285,7 @@ public: */ virtual void itemDeselected (SelectableItemType item) { (void) item; } - /** Used internally, but can be called to force a change message to be sent to the ChangeListeners. - */ + /** Used internally, but can be called to force a change message to be sent to the ChangeListeners. */ void changed (const bool synchronous = false) { if (synchronous) diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 199c1adf69..43a40bd4d3 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -625,6 +625,10 @@ bool Process::isForegroundProcess() return true; // TODO } +void Process::makeForegroundProcess() +{ +} + //============================================================================== void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType iconType, const String& title, const String& message, diff --git a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp index 51ba6e96c9..aa56a493cc 100644 --- a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp @@ -2556,6 +2556,10 @@ bool Process::isForegroundProcess() return LinuxComponentPeer::isActiveApplication; } +void Process::makeForegroundProcess() +{ +} + //============================================================================== void ModifierKeys::updateCurrentModifiers() noexcept { diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index e497e6b413..562f82d291 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -2800,6 +2800,11 @@ bool Process::isForegroundProcess() return false; } +void Process::makeForegroundProcess() +{ + // is this possible in Windows? +} + //============================================================================== class WindowsMessageBox : public AsyncUpdater {