mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 04:50:43 +02:00
Reparent to the root window before deferring close
We did this before implementing the deferred close in yabridge 3.0.0. It didn't seem necessary anymore so we got rid of it, but without this closing an iZotope Rx plugin's editor in Renoise was guaranteed to trigger an X11 error and crash Renoise. Doing this reparent doesn't seem to cause any slowdown but it does at least fix the specific combination of iZotope Rx and Renoise.
This commit is contained in:
@@ -78,9 +78,13 @@ class DeferredWindow {
|
||||
*
|
||||
* @param main_context This application's main IO context running on the GUI
|
||||
* thread.
|
||||
* @param x11_connection The X11 connection handle we're using for this
|
||||
* editor.
|
||||
* @param window A `HWND` obtained through a call to `CreateWindowEx`
|
||||
*/
|
||||
DeferredWindow(MainContext& main_context, HWND window);
|
||||
DeferredWindow(MainContext& main_context,
|
||||
std::shared_ptr<xcb_connection_t> x11_connection,
|
||||
HWND window);
|
||||
|
||||
/**
|
||||
* Post a `WM_CLOSE` message to the `handle`'s message queue as described
|
||||
@@ -92,6 +96,7 @@ class DeferredWindow {
|
||||
|
||||
private:
|
||||
MainContext& main_context;
|
||||
std::shared_ptr<xcb_connection_t> x11_connection;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -222,7 +227,7 @@ class Editor {
|
||||
*/
|
||||
void do_xembed() const;
|
||||
|
||||
std::unique_ptr<xcb_connection_t, decltype(&xcb_disconnect)> x11_connection;
|
||||
std::shared_ptr<xcb_connection_t> x11_connection;
|
||||
|
||||
/**
|
||||
* The Wine window's client area, or the maximum size of that window. This
|
||||
|
||||
Reference in New Issue
Block a user