mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Resize the Wine window using SetWindowPos
This seems to behave more reliably than resizing the window with `xcb_configure_window()`, solving some of the client area issues with Wine 9.21.
This commit is contained in:
@@ -391,10 +391,14 @@ void Editor::resize(uint16_t width, uint16_t height) {
|
|||||||
const std::array<uint32_t, 2> values{width, height};
|
const std::array<uint32_t, 2> values{width, height};
|
||||||
xcb_configure_window(x11_connection_.get(), wrapper_window_.window_,
|
xcb_configure_window(x11_connection_.get(), wrapper_window_.window_,
|
||||||
value_mask, values.data());
|
value_mask, values.data());
|
||||||
xcb_configure_window(x11_connection_.get(), wine_window_, value_mask,
|
|
||||||
values.data());
|
|
||||||
xcb_flush(x11_connection_.get());
|
xcb_flush(x11_connection_.get());
|
||||||
|
|
||||||
|
// This will trigger the `XCB_CONFIGURE_REQUEST` handler in
|
||||||
|
// `handle_x11_events()`
|
||||||
|
SetWindowPos(
|
||||||
|
win32_window_.handle_, nullptr, 0, 0, width, height,
|
||||||
|
SWP_NOREPOSITION | SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_DEFERERASE);
|
||||||
|
|
||||||
// NOTE: This lets us skip resize requests in CLAP plugins when the plugin
|
// NOTE: This lets us skip resize requests in CLAP plugins when the plugin
|
||||||
// tries to resize to its current size. This fixes resize loops when
|
// tries to resize to its current size. This fixes resize loops when
|
||||||
// using the CLAP JUCE Extensions.
|
// using the CLAP JUCE Extensions.
|
||||||
|
|||||||
Reference in New Issue
Block a user