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:
Ansho Rei
2026-11-07 03:34:28 +01:00
parent d0f1b6c95a
commit f6e303bd0f
6 changed files with 17 additions and 2 deletions
+6
View File
@@ -2,6 +2,12 @@
One section per version, newest first. One section per version, newest first.
## v0.10.4 (2026-11-07)
### Bug fixes
- The dock and taskbar show the remus icon for its window. The window now carries the app id me.anshorei.Fettleshed.Remus, which links it to the installed desktop file.
## v0.10.3 (2026-11-07) ## v0.10.3 (2026-11-07)
### Features ### Features
Generated
+1 -1
View File
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]] [[package]]
name = "remus" name = "remus"
version = "0.10.3" version = "0.10.4"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"directories", "directories",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "remus" name = "remus"
version = "0.10.3" version = "0.10.4"
edition = "2024" edition = "2024"
license = "MIT" license = "MIT"
@@ -8,3 +8,4 @@ Terminal=false
Categories=AudioVideo;Audio;Player; Categories=AudioVideo;Audio;Player;
Keywords=music;subsonic;navidrome;player; Keywords=music;subsonic;navidrome;player;
StartupNotify=true StartupNotify=true
StartupWMClass=me.anshorei.Fettleshed.Remus
@@ -20,6 +20,7 @@
</supports> </supports>
<content_rating type="oars-1.1"/> <content_rating type="oars-1.1"/>
<releases> <releases>
<release version="0.10.4" date="2026-11-07"/>
<release version="0.10.3" date="2026-11-07"/> <release version="0.10.3" date="2026-11-07"/>
<release version="0.10.2" date="2026-11-06"/> <release version="0.10.2" date="2026-11-06"/>
<release version="0.10.1" date="2026-11-06"/> <release version="0.10.1" date="2026-11-06"/>
+7
View File
@@ -15,6 +15,9 @@ mod subsonic;
use std::time::Duration; 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<()> { fn main() -> anyhow::Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("remus=info")).init(); env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("remus=info")).init();
@@ -27,6 +30,10 @@ fn main() -> anyhow::Result<()> {
.build()?; .build()?;
let ui = AppWindow::new()?; 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()); ui.set_version(env!("CARGO_PKG_VERSION").into());
app::install(&ui, rt.handle().clone()); app::install(&ui, rt.handle().clone());
// The controller is read from the device, whichever window is in front, so // The controller is read from the device, whichever window is in front, so