diff --git a/.changes/kde-taskbar-progress.md b/.changes/kde-taskbar-progress.md new file mode 100644 index 000000000..a23413a8c --- /dev/null +++ b/.changes/kde-taskbar-progress.md @@ -0,0 +1,5 @@ +--- +"tao": "patch" +--- + +On Linux, removed internal check for current desktop environment before applying `Window::set_progress_bar` API. This should allow `Window::set_progress_bar` to work on KDE Plasma and similar environments that support `libunity` APIs. diff --git a/src/platform_impl/linux/taskbar.rs b/src/platform_impl/linux/taskbar.rs index 3bbc919a6..4b951ac34 100644 --- a/src/platform_impl/linux/taskbar.rs +++ b/src/platform_impl/linux/taskbar.rs @@ -18,7 +18,6 @@ pub struct TaskbarIndicator { desktop_filename: Option, desktop_filename_c_str: Option, - is_supported: bool, unity_lib: Option>, attempted_load: bool, @@ -32,7 +31,6 @@ impl TaskbarIndicator { desktop_filename: None, desktop_filename_c_str: None, - is_supported: is_supported(), unity_lib: None, attempted_load: false, @@ -89,10 +87,6 @@ impl TaskbarIndicator { self.desktop_filename = Some(uri); } - if !self.is_supported { - return; - } - self.ensure_lib_load(); if !self.is_unity_running() { @@ -127,12 +121,3 @@ impl TaskbarIndicator { } } } - -pub fn is_supported() -> bool { - std::env::var("XDG_CURRENT_DESKTOP") - .map(|d| { - let d = d.to_lowercase(); - d.contains("unity") || d.contains("gnome") - }) - .unwrap_or(false) -}