mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
Remove the editor_coordinate_hack option
I'm not sure if this would still be necessary with the new embedding approach, but it definitely does cause more problems than it solves.
This commit is contained in:
@@ -97,12 +97,6 @@ Configuration::Configuration(const fs::path& config_path,
|
||||
} else {
|
||||
invalid_options.emplace_back(key);
|
||||
}
|
||||
} else if (key == "editor_coordinate_hack") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
editor_coordinate_hack = parsed_value->get();
|
||||
} else {
|
||||
invalid_options.emplace_back(key);
|
||||
}
|
||||
} else if (key == "editor_disable_host_scaling") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
editor_disable_host_scaling = parsed_value->get();
|
||||
|
||||
@@ -91,18 +91,6 @@ class Configuration {
|
||||
*/
|
||||
std::optional<ghc::filesystem::path> disable_pipes;
|
||||
|
||||
/**
|
||||
* If this is set to `true`, then the after every resize we will move the
|
||||
* embedded Wine window back to `(0, 0)` and then do the coordinate fixing
|
||||
* trick again. This may be useful with buggy plugins that draw their GUI
|
||||
* based on the (top level) window's position. Otherwise those GUIs will be
|
||||
* offset by the window's actual position on screen. The only plugins I've
|
||||
* encountered where this was necessary were PSPaudioware E27 and Soundtoys
|
||||
* Crystallizer. This is not enabled by default, because it also interferes
|
||||
* with resize handles.
|
||||
*/
|
||||
bool editor_coordinate_hack = false;
|
||||
|
||||
/**
|
||||
* If set to `true`, we'll remove the `XdndAware` property all ancestor
|
||||
* windows in `editor.cpp`. This is needed for REAPER as REAPER implements
|
||||
@@ -189,7 +177,6 @@ class Configuration {
|
||||
|
||||
s.ext(disable_pipes, bitsery::ext::InPlaceOptional(),
|
||||
[](S& s, auto& v) { s.ext(v, bitsery::ext::GhcPath{}); });
|
||||
s.value1b(editor_coordinate_hack);
|
||||
s.value1b(editor_force_dnd);
|
||||
s.ext(frame_rate, bitsery::ext::InPlaceOptional(),
|
||||
[](S& s, auto& v) { s.value4b(v); });
|
||||
|
||||
@@ -289,9 +289,6 @@ class PluginBridge {
|
||||
"hack: pipes disabled, plugin output will go to \"" +
|
||||
config_.disable_pipes->string() + "\"");
|
||||
}
|
||||
if (config_.editor_coordinate_hack) {
|
||||
other_options.push_back("editor: coordinate hack");
|
||||
}
|
||||
if (config_.editor_disable_host_scaling) {
|
||||
other_options.push_back("editor: no host DPI scaling");
|
||||
}
|
||||
|
||||
@@ -257,8 +257,7 @@ Editor::Editor(MainContext& main_context,
|
||||
Logger& logger,
|
||||
const size_t parent_window_handle,
|
||||
std::optional<fu2::unique_function<void()>> timer_proc)
|
||||
: use_coordinate_hack_(config.editor_coordinate_hack),
|
||||
use_force_dnd_(config.editor_force_dnd),
|
||||
: use_force_dnd_(config.editor_force_dnd),
|
||||
logger_(logger),
|
||||
x11_connection_(xcb_connect(nullptr, nullptr), xcb_disconnect),
|
||||
dnd_proxy_handle_(WineXdndProxy::get_handle()),
|
||||
@@ -401,22 +400,6 @@ void Editor::resize(uint16_t width, uint16_t height) {
|
||||
// using the CLAP JUCE Extensions.
|
||||
wrapper_window_size_.width = width;
|
||||
wrapper_window_size_.height = height;
|
||||
|
||||
// When the `editor_coordinate_hack` option is enabled, we will make sure
|
||||
// that the window is actually placed at (0, 0) coordinates. Otherwise some
|
||||
// plugins that rely on screen coordinates, like the Soundtoys plugins and
|
||||
// older PSPaudioware plugins, will draw their GUI at the wrong location
|
||||
// because they look at the (top level) window's screen coordinates instead
|
||||
// of their own relative coordinates. We don't do by default as this also
|
||||
// interferes with resize handles.
|
||||
if (use_coordinate_hack_) {
|
||||
logger_.log_editor_trace([]() {
|
||||
return "DEBUG: Resetting Wine window position back to (0, 0)";
|
||||
});
|
||||
SetWindowPos(win32_window_.handle_, nullptr, 0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOACTIVATE |
|
||||
SWP_NOOWNERZORDER | SWP_DEFERERASE | SWP_NOCOPYBITS);
|
||||
}
|
||||
}
|
||||
|
||||
void Editor::show() noexcept {
|
||||
|
||||
@@ -267,13 +267,6 @@ class Editor {
|
||||
*/
|
||||
inline Size size() const noexcept { return wrapper_window_size_; }
|
||||
|
||||
/**
|
||||
* Whether to reposition `win32_window_` to (0, 0) every time the window
|
||||
* resizes. This can help with buggy plugins that use the (top level)
|
||||
* window's screen coordinates when drawing their GUI.
|
||||
*/
|
||||
const bool use_coordinate_hack_;
|
||||
|
||||
/**
|
||||
* Whether the `editor_force_dnd` workaround for REAPER should be activated.
|
||||
* See the implementation in `editor.cpp` for more details.
|
||||
|
||||
Reference in New Issue
Block a user