disable dma buf on wayland linux (#4957)
* disable dma buf on linux * allow configuring
This commit is contained in:
1 parent
1e48093e22
commit
946a925f41
2 files changed
+38
No files matched your search
@@ -67,6 +67,7 @@ pub struct Config {
|
||||
pub(crate) window_close_behavior: WindowCloseBehaviour,
|
||||
pub(crate) custom_event_handler: Option<CustomEventHandler>,
|
||||
pub(crate) disable_file_drop_handler: bool,
|
||||
pub(crate) disable_dma_buf_on_wayland: bool,
|
||||
pub(crate) additional_windows_args: Option<String>,
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
@@ -118,6 +119,7 @@ impl Config {
|
||||
window_close_behavior: WindowCloseBehaviour::WindowCloses,
|
||||
custom_event_handler: None,
|
||||
disable_file_drop_handler: false,
|
||||
disable_dma_buf_on_wayland: true,
|
||||
on_window: None,
|
||||
additional_windows_args: None,
|
||||
}
|
||||
@@ -315,6 +317,15 @@ impl Config {
|
||||
self
|
||||
}
|
||||
|
||||
/// Set whether or not DMA-BUF usage should be disabled on Wayland.
|
||||
///
|
||||
/// Defaults to true to avoid issues on some systems. If you want to enable DMA-BUF usage, set this to false.
|
||||
/// See <https://github.com/DioxusLabs/dioxus/issues/4528#issuecomment-3476430611>
|
||||
pub fn with_disable_dma_buf_on_wayland(mut self, disable: bool) -> Self {
|
||||
self.disable_dma_buf_on_wayland = disable;
|
||||
self
|
||||
}
|
||||
|
||||
/// Add additional windows only launch arguments for webview2
|
||||
pub fn with_windows_browser_args(mut self, additional_args: impl ToString) -> Self {
|
||||
self.additional_windows_args = Some(additional_args.to_string());
|
||||
|
||||
Reference in new issue
Block a user