diff options
| author | 2026-11-21 16:54:05 +0100 | |
|---|---|---|
| committer | 2026-11-28 21:59:00 -0700 | |
| commit | 861cf929bc43105a522beb2db0b2b6bb2d56b890 (patch) | |
| tree | 06059b5075f3a62f2388f6b2fa53e05d005c6645 /WDL/rng.cpp | |
| parent | swell-generic-wayland: add a native Wayland backend (diff) | |
| download | WDL-wayland-master.tar.xz WDL-wayland-master.zip | |
VST3 3.8 lets a plugin open a Wayland connection to its host and make
its editor a subsurface of the host window. Let's monkey patch it into
REAPER. This code would be best implemented inside of REAPER proper, but
REAPER is closed source. So this patch hijacks GetPluginFactory to carry
out its mischief.
Obviously much of this will be moved into REAPER proper; SWELL isn't
supposed to depend on the VST3 SDK at all, for example. So this commit
is mostly a proof of concept, and also has some of the compositor code
that will be useful later.
This works by giving plugins a private display and forwarding its
requests to our compositor connection, which lets the compositor use the
plugin's own buffers. We share the containing xdg surface and toplevel
too, so the plugin can parent menus and dialogs and such.
Unfortunately, since this is a hack, REAPER still asks for an X11
editor. When REAPER calls GetPluginFactory, we actually use the XID it
passes to attached() to find the corresponding SWELL window. This means
we still have Xwayland allocating these, but is unused on Wayland
plugins.
To build this, point VST3_SDK at the directory containing pluginterfaces
from the 3.8 SDK. This also needs libwayland-server and libffi.
make -C WDL/swell WAYLAND=1 VST3_SDK=/path/to/vst3sdk
Diffstat (limited to 'WDL/rng.cpp')
0 files changed, 0 insertions, 0 deletions
