mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-16 16:33:55 +02:00
Strip out everything related to XEmbed
We'll just go with the same workaroud LinVST uses isntead. It's not as pretty but it does work a lot better.
This commit is contained in:
+15
-24
@@ -20,6 +20,18 @@
|
||||
* A wrapper around the win32 windowing API to create and destroy editor
|
||||
* windows. A VST plugin can embed itself in that window, and we can then later
|
||||
* embed the window in a VST host provided X11 window.
|
||||
*
|
||||
* This was originally implemented using XEmbed. While that sounded like the
|
||||
* right thing to do, there were a few minor issues with Wine's XEmbed
|
||||
* implementation. The most important of which is that resizing GUIs sometimes
|
||||
* works fine, but often fails to expand the embedded window's client area
|
||||
* leaving part of the window inaccessible. There are also some a small number
|
||||
* of plugins (such as Serum) that have rendering issues when using XEmbed but
|
||||
* otherwise draw fine when running standalone or when just reparenting the
|
||||
* window without using XEmbed. If anyone knows how to work around these two
|
||||
* issues, please let me know and I'll switch to using XEmbed again.
|
||||
*
|
||||
* This workaround was inspired by LinVST.
|
||||
*/
|
||||
class Editor {
|
||||
public:
|
||||
@@ -30,8 +42,8 @@ class Editor {
|
||||
Editor(std::string window_class_name);
|
||||
|
||||
/**
|
||||
* Open a window and return a handle to the new Win32 window that can be
|
||||
* used by the hosted VST plugin.
|
||||
* Open a window, embed it into the DAW's parent window and return a handle
|
||||
* to the new Win32 window that can be used by the hosted VST plugin.
|
||||
*
|
||||
* @param effect The plugin this window is being created for. Used to send
|
||||
* `effEditIdle` messages on a timer.
|
||||
@@ -48,14 +60,6 @@ class Editor {
|
||||
*/
|
||||
void handle_events();
|
||||
|
||||
/**
|
||||
* Embed the (open) window into the parent window.
|
||||
*
|
||||
* @return Whether the embedding was succesful. Will return false if the
|
||||
* window is not open.
|
||||
*/
|
||||
bool xembed();
|
||||
|
||||
// Needed to handle idle updates through a timer
|
||||
AEffect* plugin;
|
||||
|
||||
@@ -71,18 +75,7 @@ class Editor {
|
||||
std::optional<size_t> get_x11_handle();
|
||||
|
||||
/**
|
||||
* Send an XEmbed message to a window. See the spec for more information.
|
||||
*
|
||||
* https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html#lifecycle
|
||||
*/
|
||||
void send_xembed_event(const xcb_window_t& window,
|
||||
const uint32_t message,
|
||||
const uint32_t detail,
|
||||
const uint32_t data1,
|
||||
const uint32_t data2);
|
||||
|
||||
/**
|
||||
* The Win32 window class registered for the window window.
|
||||
* The Win32 window class registered for the windows window.
|
||||
*/
|
||||
ATOM window_class;
|
||||
|
||||
@@ -95,6 +88,4 @@ class Editor {
|
||||
win32_handle;
|
||||
|
||||
std::unique_ptr<xcb_connection_t, decltype(&xcb_disconnect)> x11_connection;
|
||||
xcb_atom_t xcb_xembed;
|
||||
xcb_atom_t xcb_xembed_info;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user