commit c00ff655bb644f1508102387b4640c33d73c5724
parent f97904136f3036b46dccc06ee88296a043f86159
Author: falkTX <falktx@falktx.com>
Date: Sun, 22 Aug 2021 23:44:25 +0100
Use a black background; Allow VST2 embed external UIs
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/distrho/src/DistrhoPluginVST2.cpp b/distrho/src/DistrhoPluginVST2.cpp
@@ -22,7 +22,7 @@
# define DISTRHO_PLUGIN_HAS_UI 0
#endif
-#if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL)
+#if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL) && ! defined (DISTRHO_PLUGIN_HAS_EXTERNAL_UI)
# undef DISTRHO_PLUGIN_HAS_UI
# define DISTRHO_PLUGIN_HAS_UI 0
#endif
diff --git a/examples/EmbedExternalUI/EmbedExternalExampleUI.cpp b/examples/EmbedExternalUI/EmbedExternalExampleUI.cpp
@@ -59,13 +59,7 @@ public:
const ::Window root = RootWindow(fDisplay, screen);
const ::Window parent = isEmbed() ? (::Window)getParentWindowHandle() : root;
- XSetWindowAttributes attr = {};
- attr.event_mask = KeyPressMask|KeyReleaseMask;
-
- fWindow = XCreateWindow(fDisplay, parent,
- 0, 0, getWidth(), getHeight(),
- 0, DefaultDepth(fDisplay, screen), InputOutput, DefaultVisual(fDisplay, screen),
- CWColormap | CWEventMask, &attr);
+ fWindow = XCreateSimpleWindow(fDisplay, parent, 0, 0, getWidth(), getHeight(), 0, 0, 0);
DISTRHO_SAFE_ASSERT_RETURN(fWindow != 0,);
XSizeHints sizeHints = {};
@@ -73,7 +67,6 @@ public:
sizeHints.min_width = getWidth();
sizeHints.min_height = getHeight();
XSetNormalHints(fDisplay, fWindow, &sizeHints);
-
XStoreName(fDisplay, fWindow, getTitle());
if (parent == root)