Skip to content

Commit

Permalink
Work around reparenting issues in #40
Browse files Browse the repository at this point in the history
I'm still really curious why this double reparent would be needed
though. Everything works fine on any other i3 config I've tried, and
even the exact same config in a VM works fine for me.
  • Loading branch information
robbert-vdh committed Oct 12, 2020
1 parent f409dbe commit 95ad6fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion src/wine-host/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 95ad6fc

Please sign in to comment.