From 04e03840e02b85ba6a38a87dc2dfe6c1119418a7 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 9 Oct 2022 14:22:49 +0200 Subject: [PATCH] Rename maybe_resize_editor() to resize_editor() --- src/wine-host/bridges/clap-impls/host-proxy.cpp | 3 +-- src/wine-host/bridges/clap.cpp | 6 +++--- src/wine-host/bridges/clap.h | 4 +--- src/wine-host/bridges/vst3-impls/plug-frame-proxy.cpp | 2 +- src/wine-host/bridges/vst3.cpp | 2 +- src/wine-host/bridges/vst3.h | 2 +- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/wine-host/bridges/clap-impls/host-proxy.cpp b/src/wine-host/bridges/clap-impls/host-proxy.cpp index 7e5d12d0..018f7195 100644 --- a/src/wine-host/bridges/clap-impls/host-proxy.cpp +++ b/src/wine-host/bridges/clap-impls/host-proxy.cpp @@ -241,8 +241,7 @@ bool CLAP_ABI clap_host_proxy::ext_gui_request_resize(const clap_host_t* host, // If the resize request was accepted by the host, then we'll also resize // our editor window if (result) { - self->bridge_.maybe_resize_editor(self->owner_instance_id_, width, - height); + self->bridge_.resize_editor(self->owner_instance_id_, width, height); } return result; diff --git a/src/wine-host/bridges/clap.cpp b/src/wine-host/bridges/clap.cpp index 4402ebc1..82b7809d 100644 --- a/src/wine-host/bridges/clap.cpp +++ b/src/wine-host/bridges/clap.cpp @@ -740,9 +740,9 @@ void ClapBridge::run() { } // NOLINTNEXTLINE(bugprone-easily-swappable-parameters) -bool ClapBridge::maybe_resize_editor(size_t instance_id, - uint16_t width, - uint16_t height) { +bool ClapBridge::resize_editor(size_t instance_id, + uint16_t width, + uint16_t height) { const auto& [instance, _] = get_instance(instance_id); if (instance.editor) { diff --git a/src/wine-host/bridges/clap.h b/src/wine-host/bridges/clap.h index b97a791d..a47188a0 100644 --- a/src/wine-host/bridges/clap.h +++ b/src/wine-host/bridges/clap.h @@ -215,9 +215,7 @@ class ClapBridge : public HostBridge { * the new size. This is called from `clap_host_gui::request_resize()` after * the host returns `true`. */ - bool maybe_resize_editor(size_t instance_id, - uint16_t width, - uint16_t height); + bool resize_editor(size_t instance_id, uint16_t width, uint16_t height); /** * Get the plugin instance's current editor size, if it has an active diff --git a/src/wine-host/bridges/vst3-impls/plug-frame-proxy.cpp b/src/wine-host/bridges/vst3-impls/plug-frame-proxy.cpp index ec3b75cc..c7c34c04 100644 --- a/src/wine-host/bridges/vst3-impls/plug-frame-proxy.cpp +++ b/src/wine-host/bridges/vst3-impls/plug-frame-proxy.cpp @@ -47,7 +47,7 @@ Vst3PlugFrameProxyImpl::resizeView(Steinberg::IPlugView* /*view*/, // Resize the editor wrapper window in advance. We will do another // resize automatically on `IPlugView::onSize()`, but this should make // resizes look a bit smoother. - bridge_.maybe_resize_editor(owner_instance_id(), *newSize); + bridge_.resize_editor(owner_instance_id(), *newSize); // We have to use this special sending function here so we can handle // calls to `IPlugView::onSize()` from this same thread (the UI thread). diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index 20a5e3cd..86ad33b9 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -1314,7 +1314,7 @@ void Vst3Bridge::run() { }); } -bool Vst3Bridge::maybe_resize_editor(size_t instance_id, +bool Vst3Bridge::resize_editor(size_t instance_id, const Steinberg::ViewRect& new_size) { const auto& [instance, _] = get_instance(instance_id); diff --git a/src/wine-host/bridges/vst3.h b/src/wine-host/bridges/vst3.h index f1b2b41f..63f64466 100644 --- a/src/wine-host/bridges/vst3.h +++ b/src/wine-host/bridges/vst3.h @@ -308,7 +308,7 @@ class Vst3Bridge : public HostBridge { * the new size. This is called from `IPlugFrame::resizeView()` to make sure * we do the resize before the request gets sent to the host. */ - bool maybe_resize_editor(size_t instance_id, + bool resize_editor(size_t instance_id, const Steinberg::ViewRect& new_size); /**