Signed-off-by: falkTX <falktx@falktx.com>tags/v2.1-rc1
@@ -1827,7 +1827,7 @@ class HostWindow(QMainWindow): | |||||
# Transport | # Transport | ||||
def refreshTransport(self, forced = False): | def refreshTransport(self, forced = False): | ||||
if not self.isVisible(): | |||||
if not self.ui.l_transport_time.isVisible(): | |||||
return | return | ||||
if self.fSampleRate == 0.0 or not self.host.is_engine_running(): | if self.fSampleRate == 0.0 or not self.host.is_engine_running(): | ||||
return | return | ||||
@@ -20,7 +20,7 @@ | |||||
# Imports (Global) | # Imports (Global) | ||||
from PyQt5.QtGui import QKeySequence, QMouseEvent | from PyQt5.QtGui import QKeySequence, QMouseEvent | ||||
from PyQt5.QtWidgets import QHBoxLayout | |||||
from PyQt5.QtWidgets import QSplitter | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
# Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
@@ -466,7 +466,15 @@ class CarlaEmbedW(QEmbedWidget): | |||||
if self.host.processMode == ENGINE_PROCESS_MODE_PATCHBAY: | if self.host.processMode == ENGINE_PROCESS_MODE_PATCHBAY: | ||||
self.addLine() | self.addLine() | ||||
self.addWidget(self.gui.centralWidget()) | |||||
self.fCentralSplitter = QSplitter(self) | |||||
policy = self.fCentralSplitter.sizePolicy() | |||||
policy.setVerticalStretch(1) | |||||
self.fCentralSplitter.setSizePolicy(policy) | |||||
self.addCentralWidget(self.gui.ui.dockWidget) | |||||
self.addCentralWidget(self.gui.centralWidget()) | |||||
self.fLayout.addWidget(self.fCentralSplitter) | |||||
self.finalSetup(self.gui, winId) | self.finalSetup(self.gui, winId) | ||||
def addShortcutActions(self, actions): | def addShortcutActions(self, actions): | ||||
@@ -478,6 +486,10 @@ class CarlaEmbedW(QEmbedWidget): | |||||
widget.setParent(self) | widget.setParent(self) | ||||
self.fLayout.addWidget(widget) | self.fLayout.addWidget(widget) | ||||
def addCentralWidget(self, widget): | |||||
widget.setParent(self) | |||||
self.fCentralSplitter.addWidget(widget) | |||||
def addLine(self): | def addLine(self): | ||||
line = QFrame(self) | line = QFrame(self) | ||||
line.setFrameShadow(QFrame.Sunken) | line.setFrameShadow(QFrame.Sunken) | ||||
@@ -84,7 +84,7 @@ public: | |||||
fMidiEventCount(0), | fMidiEventCount(0), | ||||
fTimeInfo(), | fTimeInfo(), | ||||
fVstRect(), | fVstRect(), | ||||
#ifndef CARLA_OS_LINUX | |||||
#ifndef HAVE_X11 | |||||
fUiLauncher(nullptr), | fUiLauncher(nullptr), | ||||
#endif | #endif | ||||
fHostType(kHostTypeNull), | fHostType(kHostTypeNull), | ||||
@@ -135,7 +135,7 @@ public: | |||||
fVstRect.top = 0; | fVstRect.top = 0; | ||||
fVstRect.left = 0; | fVstRect.left = 0; | ||||
#ifdef CARLA_OS_LINUX | |||||
#ifdef HAVE_X11 | |||||
fVstRect.bottom = 712; | fVstRect.bottom = 712; | ||||
fVstRect.right = 1024; | fVstRect.right = 1024; | ||||
#else | #else | ||||
@@ -295,7 +295,7 @@ public: | |||||
case effEditOpen: | case effEditOpen: | ||||
if (fDescriptor->ui_show != nullptr) | if (fDescriptor->ui_show != nullptr) | ||||
{ | { | ||||
#ifdef CARLA_OS_LINUX | |||||
#ifdef HAVE_X11 | |||||
char strBuf[0xff+1]; | char strBuf[0xff+1]; | ||||
std::snprintf(strBuf, 0xff, P_INTPTR, (intptr_t)ptr); | std::snprintf(strBuf, 0xff, P_INTPTR, (intptr_t)ptr); | ||||
strBuf[0xff] = '\0'; | strBuf[0xff] = '\0'; | ||||
@@ -319,7 +319,7 @@ public: | |||||
case effEditClose: | case effEditClose: | ||||
if (fDescriptor->ui_show != nullptr) | if (fDescriptor->ui_show != nullptr) | ||||
{ | { | ||||
#ifdef CARLA_OS_LINUX | |||||
#ifdef HAVE_X11 | |||||
fDescriptor->ui_show(fHandle, false); | fDescriptor->ui_show(fHandle, false); | ||||
#else | #else | ||||
destoryUILauncher(fUiLauncher); | destoryUILauncher(fUiLauncher); | ||||
@@ -330,7 +330,7 @@ public: | |||||
break; | break; | ||||
case effEditIdle: | case effEditIdle: | ||||
#ifndef CARLA_OS_LINUX | |||||
#ifndef HAVE_X11 | |||||
if (fUiLauncher != nullptr) | if (fUiLauncher != nullptr) | ||||
idleUILauncher(fUiLauncher); | idleUILauncher(fUiLauncher); | ||||
#endif | #endif | ||||
@@ -629,7 +629,7 @@ private: | |||||
NativeTimeInfo fTimeInfo; | NativeTimeInfo fTimeInfo; | ||||
ERect fVstRect; | ERect fVstRect; | ||||
#ifndef CARLA_OS_LINUX | |||||
#ifndef HAVE_X11 | |||||
// UI button | // UI button | ||||
CarlaUILauncher* fUiLauncher; | CarlaUILauncher* fUiLauncher; | ||||
#endif | #endif | ||||
@@ -19,7 +19,7 @@ | |||||
#include "CarlaNative.h" | #include "CarlaNative.h" | ||||
#include "vestige/vestige.h" | #include "vestige/vestige.h" | ||||
#ifndef CARLA_OS_LINUX | |||||
#ifndef HAVE_X11 | |||||
# include "ui_launcher_res.hpp" | # include "ui_launcher_res.hpp" | ||||
struct CarlaUILauncher; | struct CarlaUILauncher; | ||||
#endif | #endif | ||||
@@ -31,7 +31,7 @@ struct VstObject { | |||||
NativePlugin* plugin; | NativePlugin* plugin; | ||||
}; | }; | ||||
#ifndef CARLA_OS_LINUX | |||||
#ifndef HAVE_X11 | |||||
CarlaUILauncher* createUILauncher(const intptr_t winId, | CarlaUILauncher* createUILauncher(const intptr_t winId, | ||||
const NativePluginDescriptor* const d, | const NativePluginDescriptor* const d, | ||||
const NativePluginHandle h); | const NativePluginHandle h); | ||||