revert main.cpp — remove NSApplicationActivationPolicyAccessory (this broke the fullscreen behavior)
Browse filesThe original code had NO activation policy override. macOS was showing
the Helper window in Ableton's Space by default. Adding Accessory policy
caused macOS to treat it differently and put it in a separate Space.
Going back to the original main.cpp that was working before the close-button fix.
- Source/Helper/main.cpp +0 -15
Source/Helper/main.cpp
CHANGED
|
@@ -3,11 +3,6 @@
|
|
| 3 |
#include <juce_gui_basics/juce_gui_basics.h>
|
| 4 |
#include <juce_events/juce_events.h>
|
| 5 |
|
| 6 |
-
#if JUCE_MAC
|
| 7 |
-
#include <objc/objc.h>
|
| 8 |
-
#include <objc/message.h>
|
| 9 |
-
#endif
|
| 10 |
-
|
| 11 |
#include "SharedAudioBuffer.h"
|
| 12 |
#include "IPCProtocol.h"
|
| 13 |
#include "Constants.h"
|
|
@@ -22,16 +17,6 @@ public:
|
|
| 22 |
|
| 23 |
void initialise(const juce::String& commandLine) override
|
| 24 |
{
|
| 25 |
-
#if JUCE_MAC
|
| 26 |
-
// SET ACTIVATION POLICY BEFORE ANYTHING ELSE
|
| 27 |
-
// Policy 1 = NSApplicationActivationPolicyAccessory
|
| 28 |
-
// This prevents: Dock icon, Cmd+Tab entry, focus stealing on launch
|
| 29 |
-
id nsApp = ((id(*)(id, SEL))objc_msgSend)((id)objc_getClass("NSApplication"),
|
| 30 |
-
sel_registerName("sharedApplication"));
|
| 31 |
-
((void(*)(id, SEL, long))objc_msgSend)(nsApp,
|
| 32 |
-
sel_registerName("setActivationPolicy:"), 1);
|
| 33 |
-
#endif
|
| 34 |
-
|
| 35 |
auto args = juce::StringArray::fromTokens(commandLine, " ", "\"");
|
| 36 |
|
| 37 |
int parentPid = 0;
|
|
|
|
| 3 |
#include <juce_gui_basics/juce_gui_basics.h>
|
| 4 |
#include <juce_events/juce_events.h>
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
#include "SharedAudioBuffer.h"
|
| 7 |
#include "IPCProtocol.h"
|
| 8 |
#include "Constants.h"
|
|
|
|
| 17 |
|
| 18 |
void initialise(const juce::String& commandLine) override
|
| 19 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
auto args = juce::StringArray::fromTokens(commandLine, " ", "\"");
|
| 21 |
|
| 22 |
int parentPid = 0;
|