mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
Add an XEmbed compatibility option
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_xembed") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
editor_xembed = parsed_value->get();
|
||||
} else {
|
||||
invalid_options.push_back(key);
|
||||
}
|
||||
} else if (key == "group") {
|
||||
if (const auto parsed_value = value.as_string()) {
|
||||
group = parsed_value->get();
|
||||
|
||||
@@ -101,6 +101,14 @@ class Configuration {
|
||||
*/
|
||||
bool editor_double_embed = 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
|
||||
* issues, so this is disabled by default. Also, editor resizing won't work
|
||||
* reliably when XEmbed is enabled.
|
||||
*/
|
||||
bool editor_xembed = false;
|
||||
|
||||
/**
|
||||
* The name of the plugin group that should be used for the plugin this
|
||||
* configuration object was created for. If not set, then the plugin should
|
||||
@@ -135,6 +143,7 @@ class Configuration {
|
||||
void serialize(S& s) {
|
||||
s.value1b(cache_time_info);
|
||||
s.value1b(editor_double_embed);
|
||||
s.value1b(editor_xembed);
|
||||
s.ext(group, bitsery::ext::StdOptional(),
|
||||
[](S& s, auto& v) { s.text1b(v, 4096); });
|
||||
s.ext(matched_file, bitsery::ext::StdOptional(),
|
||||
|
||||
@@ -160,6 +160,9 @@ class PluginBridge {
|
||||
if (config.editor_double_embed) {
|
||||
other_options.push_back("editor: double embed");
|
||||
}
|
||||
if (config.editor_xembed) {
|
||||
other_options.push_back("editor: XEmbed");
|
||||
}
|
||||
if (!other_options.empty()) {
|
||||
init_msg << join_quoted_strings(other_options) << std::endl;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user