RAM2118 commited on
Commit
efff31a
·
verified ·
1 Parent(s): e4e1e6d

fix: restore setAlwaysOnTop(true) — fixes GUI opening in separate space in fullscreen

Browse files

Root cause: commit 0632681 removed setAlwaysOnTop(true) and replaced it
with manual objc_msgSend level tricks. Those tricks don't keep the window
in the same Space as Ableton when fullscreen.

Fix: put back setAlwaysOnTop(true) + keep the X button fix (closeButtonPressed
hides window instead of quitting). Removed all objc_msgSend hacks.

Files changed (1) hide show
  1. Source/Helper/HelperPluginHost.cpp +2 -6
Source/Helper/HelperPluginHost.cpp CHANGED
@@ -4,12 +4,7 @@
4
  #include <pthread.h>
5
  #include <sched.h>
6
 
7
- #if JUCE_MAC
8
- #include <objc/objc.h>
9
- #include <objc/message.h>
10
- #endif
11
-
12
- // Custom window
13
  class PluginGuiWindow : public juce::DocumentWindow
14
  {
15
  public:
@@ -264,6 +259,7 @@ void HelperPluginHost::showGui()
264
  guiWindow = std::make_unique<PluginGuiWindow>(plugin->getName());
265
  guiWindow->setContentOwned(editor, true);
266
  guiWindow->setResizable(true, true);
 
267
  guiWindow->centreWithSize(editor->getWidth(), editor->getHeight());
268
  guiWindow->setVisible(true);
269
  });
 
4
  #include <pthread.h>
5
  #include <sched.h>
6
 
7
+ // Custom window — X button hides instead of quitting
 
 
 
 
 
8
  class PluginGuiWindow : public juce::DocumentWindow
9
  {
10
  public:
 
259
  guiWindow = std::make_unique<PluginGuiWindow>(plugin->getName());
260
  guiWindow->setContentOwned(editor, true);
261
  guiWindow->setResizable(true, true);
262
+ guiWindow->setAlwaysOnTop(true);
263
  guiWindow->centreWithSize(editor->getWidth(), editor->getHeight());
264
  guiWindow->setVisible(true);
265
  });