diff --git a/resources/ui/carla_add_jack.ui b/resources/ui/carla_add_jack.ui
index 99669ca7b..921f7af38 100644
--- a/resources/ui/carla_add_jack.ui
+++ b/resources/ui/carla_add_jack.ui
@@ -6,7 +6,7 @@
0
0
- 468
+ 471
369
@@ -111,9 +111,6 @@
-
-
- false
-
Session Manager:
@@ -124,22 +121,22 @@
-
-
- false
+
+ 1
-
- None / Manual
+ None
-
- LADISH (SIGUSR1)
+ Auto
-
- Non Session Manager (OSC)
+ LADISH (SIGUSR1)
diff --git a/source/backend/plugin/CarlaPluginJack.cpp b/source/backend/plugin/CarlaPluginJack.cpp
index 0687e2ecc..f5465bed9 100644
--- a/source/backend/plugin/CarlaPluginJack.cpp
+++ b/source/backend/plugin/CarlaPluginJack.cpp
@@ -325,6 +325,16 @@ public:
// -------------------------------------------------------------------
// Set data (state)
+ void prepareForSave() noexcept override
+ {
+ {
+ const CarlaMutexLocker _cml(fShmNonRtClientControl.mutex);
+
+ fShmNonRtClientControl.writeOpcode(kPluginBridgeNonRtClientPrepareForSave);
+ fShmNonRtClientControl.commitWrite();
+ }
+ }
+
// -------------------------------------------------------------------
// Set data (internal stuff)
diff --git a/source/frontend/carla_database.py b/source/frontend/carla_database.py
index fc7ae6a47..a10291918 100755
--- a/source/frontend/carla_database.py
+++ b/source/frontend/carla_database.py
@@ -1718,9 +1718,9 @@ class PluginDatabaseW(QDialog):
class JackApplicationW(QDialog):
SESSION_MGR_NONE = 0
- SESSION_MGR_JACK = 1
- SESSION_MGR_LADISH = 2
- SESSION_MGR_LASH = 3
+ SESSION_MGR_AUTO = 1
+ SESSION_MGR_JACK = 2
+ SESSION_MGR_LADISH = 3
SESSION_MGR_NSM = 4
FLAG_CONTROL_WINDOW = 0x01
@@ -1762,9 +1762,11 @@ class JackApplicationW(QDialog):
name = os.path.basename(command.split(" ",1)[0])
# TODO finalize flag definitions
- #uiSessionMgrIndex = self.ui.cb_session_mgr.currentIndex()
- #if uiSessionMgrIndex == 1:
- #smgr = self.SESSION_MGR_LADISH
+ uiSessionMgrIndex = self.ui.cb_session_mgr.currentIndex()
+ if uiSessionMgrIndex == 1:
+ smgr = self.SESSION_MGR_AUTO
+ elif uiSessionMgrIndex == 2:
+ smgr = self.SESSION_MGR_LADISH
#elif uiSessionMgrIndex == 2:
#smgr = self.SESSION_MGR_NSM
diff --git a/source/libjack/libjack.cpp b/source/libjack/libjack.cpp
index 9816c4a5f..272b3fcf9 100644
--- a/source/libjack/libjack.cpp
+++ b/source/libjack/libjack.cpp
@@ -940,6 +940,20 @@ bool CarlaJackAppClient::handleNonRtData()
case kPluginBridgeNonRtClientPrepareForSave:
{
+ if (fSessionManager == 1) // auto
+ {
+ struct sigaction sig;
+ carla_zeroStruct(sig);
+
+ sigaction(SIGUSR1, nullptr, &sig);
+
+ if (sig.sa_handler != nullptr)
+ fSessionManager = 3;
+ }
+
+ if (fSessionManager == 3)
+ ::kill(::getpid(), SIGUSR1);
+
const CarlaMutexLocker _cml(fShmNonRtServerControl.mutex);
fShmNonRtServerControl.writeOpcode(kPluginBridgeNonRtServerSaved);