fix: give the window the app id so docks show the remus icon
Without an app id on Wayland, or a WM_CLASS on X11, a dock cannot link the window to me.anshorei.Fettleshed.Remus.desktop and draws a generic icon. The desktop file also names the class in StartupWMClass.
This commit is contained in:
@@ -15,6 +15,9 @@ mod subsonic;
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
/// The Flatpak app id, which is also the name of the desktop file.
|
||||
const APP_ID: &str = "me.anshorei.Fettleshed.Remus";
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("remus=info")).init();
|
||||
|
||||
@@ -27,6 +30,10 @@ fn main() -> anyhow::Result<()> {
|
||||
.build()?;
|
||||
|
||||
let ui = AppWindow::new()?;
|
||||
// Docks match the window to the desktop file by this id, on Wayland as
|
||||
// the app id and on X11 as the WM_CLASS. It needs the platform that
|
||||
// AppWindow::new sets up, and has to be set before the window is shown.
|
||||
slint::set_xdg_app_id(APP_ID)?;
|
||||
ui.set_version(env!("CARGO_PKG_VERSION").into());
|
||||
app::install(&ui, rt.handle().clone());
|
||||
// The controller is read from the device, whichever window is in front, so
|
||||
|
||||
Reference in New Issue
Block a user