Resize the new wrapper window for VST2 plugins

This commit is contained in:
Robbert van der Helm
2021-07-21 15:53:30 +02:00
parent 42762d1abe
commit 418cd68a81
3 changed files with 48 additions and 8 deletions
+14
View File
@@ -428,6 +428,20 @@ Editor::Editor(MainContext& main_context,
}
}
void Editor::resize(uint16_t width, uint16_t height) noexcept {
logger.log_editor_trace([&]() {
return "DEBUG: Resizing wrapper window to " + std::to_string(width) +
"x" + std::to_string(height);
});
const uint16_t value_mask =
XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
const std::array<uint32_t, 2> values{width, height};
xcb_configure_window(x11_connection.get(), wrapper_window.window,
value_mask, values.data());
xcb_flush(x11_connection.get());
}
void Editor::handle_x11_events() noexcept {
// NOTE: Ardour will unmap the window instead of closing the editor. When
// the window is unmapped `wine_window` doesn't exist and any X11