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:
Robbert van der Helm
2025-03-01 19:17:29 +01:00
parent 51e4d61004
commit 66840d4d16
7 changed files with 4 additions and 51 deletions
+3
View File
@@ -27,6 +27,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
- The `editor_xembed` compatibility option has been removed. This option hasn't - The `editor_xembed` compatibility option has been removed. This option hasn't
worked properly for the last couple major Wine releases. worked properly for the last couple major Wine releases.
- The `editor_coordinate_hack` compatibility option has been removed. This was a
very specific option to work around a very specific problem, and its existence
resulted in more confusion than it solved problems.
- Out of the box support for building a 32-bit version of yabridge for use in - Out of the box support for building a 32-bit version of yabridge for use in
64-bit machines has been dropped as part of solving a compatibility issue with 64-bit machines has been dropped as part of solving a compatibility issue with
newer Meson versions newer Meson versions
-4
View File
@@ -334,7 +334,6 @@ you load a new plugin._
| Option | Values | Description | | Option | Values | Description |
| ----------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `disable_pipes` | `{true,false,<string>}` | When this option is enabled, yabridge will redirect the Wine plugin host's output streams to a file without any further processing. See the [known issues](#known-issues-and-fixes) section for a list of plugins where this may be useful. This can be set to a boolean, in which case the output will be written to `$XDG_RUNTIME_DIR/yabridge-plugin-output.log`, or to an absolute path (with no expansion for tildes or environment variables). Defaults to `false`. | | `disable_pipes` | `{true,false,<string>}` | When this option is enabled, yabridge will redirect the Wine plugin host's output streams to a file without any further processing. See the [known issues](#known-issues-and-fixes) section for a list of plugins where this may be useful. This can be set to a boolean, in which case the output will be written to `$XDG_RUNTIME_DIR/yabridge-plugin-output.log`, or to an absolute path (with no expansion for tildes or environment variables). Defaults to `false`. |
| `editor_coordinate_hack` | `{true,false}` | Compatibility option for plugins that rely on the absolute screen coordinates of the window they're embedded in. Since the Wine window gets embedded inside of a window provided by your DAW, these coordinates won't match up and the plugin would end up drawing in the wrong location without this option. Currently the only known plugins that require this option are _PSPaudioware E27_ and _Soundtoys Crystallizer_. Defaults to `false`. |
| `editor_disable_host_scaling` | `{true,false}` | Disable host-driven HiDPI scaling for VST3 and CLAP plugins. Wine currently does not have proper fractional HiDPI support, so you might have to enable this option if you're using a HiDPI display. In most cases setting the font DPI in `winecfg`'s graphics tab to 192 will cause plugins to scale correctly at 200% size. Defaults to `false`. | | `editor_disable_host_scaling` | `{true,false}` | Disable host-driven HiDPI scaling for VST3 and CLAP plugins. Wine currently does not have proper fractional HiDPI support, so you might have to enable this option if you're using a HiDPI display. In most cases setting the font DPI in `winecfg`'s graphics tab to 192 will cause plugins to scale correctly at 200% size. Defaults to `false`. |
| `editor_force_dnd` | `{true,false}` | This option forcefully enables drag-and-drop support in _REAPER_. Because REAPER's FX window supports drag-and-drop itself, dragging a file onto a plugin editor will cause the drop to be intercepted by the FX window. This makes it impossible to drag files onto plugins in REAPER under normal circumstances. Setting this option to `true` will strip drag-and-drop support from the FX window, thus allowing files to be dragged onto the plugin again. Defaults to `false`. | | `editor_force_dnd` | `{true,false}` | This option forcefully enables drag-and-drop support in _REAPER_. Because REAPER's FX window supports drag-and-drop itself, dragging a file onto a plugin editor will cause the drop to be intercepted by the FX window. This makes it impossible to drag files onto plugins in REAPER under normal circumstances. Setting this option to `true` will strip drag-and-drop support from the FX window, thus allowing files to be dragged onto the plugin again. Defaults to `false`. |
| `frame_rate` | `<number>` | The rate at which Win32 events are being handled and usually also the refresh rate of a plugin's editor GUI. When using plugin groups all plugins share the same event handling loop, so in those the last loaded plugin will set the refresh rate. Defaults to `60`. | | `frame_rate` | `<number>` | The rate at which Win32 events are being handled and usually also the refresh rate of a plugin's editor GUI. When using plugin groups all plugins share the same event handling loop, so in those the last loaded plugin will set the refresh rate. Defaults to `60`. |
@@ -364,9 +363,6 @@ group = "melda"
["ToneBoosters"] ["ToneBoosters"]
group = "toneboosters" group = "toneboosters"
["PSPaudioware"]
editor_coordinate_hack = true
["Chromaphone 3.so"] ["Chromaphone 3.so"]
hide_daw = true hide_daw = true
-6
View File
@@ -97,12 +97,6 @@ Configuration::Configuration(const fs::path& config_path,
} else { } else {
invalid_options.emplace_back(key); 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") { } else if (key == "editor_disable_host_scaling") {
if (const auto parsed_value = value.as_boolean()) { if (const auto parsed_value = value.as_boolean()) {
editor_disable_host_scaling = parsed_value->get(); editor_disable_host_scaling = parsed_value->get();
-13
View File
@@ -91,18 +91,6 @@ class Configuration {
*/ */
std::optional<ghc::filesystem::path> disable_pipes; 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 * If set to `true`, we'll remove the `XdndAware` property all ancestor
* windows in `editor.cpp`. This is needed for REAPER as REAPER implements * 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.ext(disable_pipes, bitsery::ext::InPlaceOptional(),
[](S& s, auto& v) { s.ext(v, bitsery::ext::GhcPath{}); }); [](S& s, auto& v) { s.ext(v, bitsery::ext::GhcPath{}); });
s.value1b(editor_coordinate_hack);
s.value1b(editor_force_dnd); s.value1b(editor_force_dnd);
s.ext(frame_rate, bitsery::ext::InPlaceOptional(), s.ext(frame_rate, bitsery::ext::InPlaceOptional(),
[](S& s, auto& v) { s.value4b(v); }); [](S& s, auto& v) { s.value4b(v); });
-3
View File
@@ -289,9 +289,6 @@ class PluginBridge {
"hack: pipes disabled, plugin output will go to \"" + "hack: pipes disabled, plugin output will go to \"" +
config_.disable_pipes->string() + "\""); config_.disable_pipes->string() + "\"");
} }
if (config_.editor_coordinate_hack) {
other_options.push_back("editor: coordinate hack");
}
if (config_.editor_disable_host_scaling) { if (config_.editor_disable_host_scaling) {
other_options.push_back("editor: no host DPI scaling"); other_options.push_back("editor: no host DPI scaling");
} }
+1 -18
View File
@@ -257,8 +257,7 @@ Editor::Editor(MainContext& main_context,
Logger& logger, Logger& logger,
const size_t parent_window_handle, const size_t parent_window_handle,
std::optional<fu2::unique_function<void()>> timer_proc) 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), logger_(logger),
x11_connection_(xcb_connect(nullptr, nullptr), xcb_disconnect), x11_connection_(xcb_connect(nullptr, nullptr), xcb_disconnect),
dnd_proxy_handle_(WineXdndProxy::get_handle()), dnd_proxy_handle_(WineXdndProxy::get_handle()),
@@ -401,22 +400,6 @@ void Editor::resize(uint16_t width, uint16_t height) {
// using the CLAP JUCE Extensions. // using the CLAP JUCE Extensions.
wrapper_window_size_.width = width; wrapper_window_size_.width = width;
wrapper_window_size_.height = height; 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 { void Editor::show() noexcept {
-7
View File
@@ -267,13 +267,6 @@ class Editor {
*/ */
inline Size size() const noexcept { return wrapper_window_size_; } 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. * Whether the `editor_force_dnd` workaround for REAPER should be activated.
* See the implementation in `editor.cpp` for more details. * See the implementation in `editor.cpp` for more details.