Browse Source

Use a black background; Allow VST2 embed external UIs

Signed-off-by: falkTX <falktx@falktx.com>
pull/312/head
falkTX 3 years ago
parent
commit
c00ff655bb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 2 additions and 9 deletions
  1. +1
    -1
      distrho/src/DistrhoPluginVST2.cpp
  2. +1
    -8
      examples/EmbedExternalUI/EmbedExternalExampleUI.cpp

+ 1
- 1
distrho/src/DistrhoPluginVST2.cpp View File

@@ -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


+ 1
- 8
examples/EmbedExternalUI/EmbedExternalExampleUI.cpp View File

@@ -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)


Loading…
Cancel
Save