diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f6875cf..ff929d43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). the suggestion to enable the `hack_reaper_update_display` workaround for REAPER when it is not already enabled. +### Fixed + +- Added a workaround for reparenting issues with the plugin editor GUI on a + [specific i3 setup](https://github.com/robbert-vdh/yabridge/issues/40). + ## [1.6.1] - 2020-09-28 ### Fixed diff --git a/src/wine-host/editor.cpp b/src/wine-host/editor.cpp index 630d457e..0f05c20d 100644 --- a/src/wine-host/editor.cpp +++ b/src/wine-host/editor.cpp @@ -179,13 +179,20 @@ Editor::Editor(const Configuration& config, // child window ourselves. This is a hack to work around the issue's // described in `Editor`'s docstring'. xcb_reparent_window(x11_connection.get(), wine_window, parent_window, 0, 0); - xcb_map_window(x11_connection.get(), wine_window); xcb_flush(x11_connection.get()); ShowWindow(win32_handle.get(), SW_SHOWNORMAL); if (win32_child_handle) { ShowWindow(win32_child_handle->get(), SW_SHOWNORMAL); } + + // HACK: I can't seem to figure why the initial reparent would fail on this + // particular i3 config in a way that I'm unable to reproduce, but if + // it doesn't work the first time, just keep trying! + // + // https://github.com/robot-vdh/yabridge/issues/40 + xcb_reparent_window(x11_connection.get(), wine_window, parent_window, 0, 0); + xcb_flush(x11_connection.get()); } Editor::~Editor() {