Work around reparenting issues in #40

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.
This commit is contained in:
Robbert van der Helm
2020-10-12 14:28:29 +02:00
parent f409dbec59
commit 95ad6fc36a
2 changed files with 13 additions and 1 deletions
+8 -1
View File
@@ -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() {