mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-10 14:22:16 +02:00
Add an option to force drag-and-drop under REAPER
This works around a long standing bug in REAPER itself that would prevent you from dragging files onto any plugin editor window.
This commit is contained in:
@@ -90,6 +90,12 @@ Configuration::Configuration(const fs::path& config_path,
|
||||
} else {
|
||||
invalid_options.push_back(key);
|
||||
}
|
||||
} else if (key == "editor_force_dnd") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
editor_force_dnd = parsed_value->get();
|
||||
} else {
|
||||
invalid_options.push_back(key);
|
||||
}
|
||||
} else if (key == "editor_xembed") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
editor_xembed = parsed_value->get();
|
||||
|
||||
@@ -102,6 +102,15 @@ class Configuration {
|
||||
*/
|
||||
bool editor_double_embed = 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
|
||||
* (but doesn't use) drag-and-drop support on all of its windows. This
|
||||
* causes the FX window to intercept the drop thus making it impossible to
|
||||
* drag files onto plugin editors, native or otherwise.
|
||||
*/
|
||||
bool editor_force_dnd = false;
|
||||
|
||||
/**
|
||||
* Use XEmbed instead of yabridge's normal editor embedding method. Wine's
|
||||
* XEmbed support is not very polished yet and tends to lead to rendering
|
||||
@@ -173,6 +182,7 @@ class Configuration {
|
||||
void serialize(S& s) {
|
||||
s.value1b(cache_time_info);
|
||||
s.value1b(editor_double_embed);
|
||||
s.value1b(editor_force_dnd);
|
||||
s.value1b(editor_xembed);
|
||||
s.ext(frame_rate, bitsery::ext::StdOptional(),
|
||||
[](S& s, auto& v) { s.value4b(v); });
|
||||
|
||||
Reference in New Issue
Block a user