PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Linux: StartupWMClass is the window's app id (#1087)
Atos Linsea1df6e1cb3a
diff --git a/apps/pdfcraft/src/main.rs b/apps/pdfcraft/src/main.rsindex a1cfd4b38..f046399a7 100644--- a/apps/pdfcraft/src/main.rs+++ b/apps/pdfcraft/src/main.rs@@ -1173,4 +1173,13 @@ mod tests {}let _ = std::fs::remove_dir_all(&dir);}++ /// X11 startup notification and docks match a window to its launcher by `StartupWMClass`,+ /// so it has to be the class the window carries: the app id, on Wayland and X11 alike.+ #[test]+ fn the_desktop_entry_names_the_window_class() {+ let entry = include_str!("../../../packaging/linux/ai.storyteller.pdfcraft.desktop");+ let class = entry.lines().find_map(|line| line.strip_prefix("StartupWMClass="));+ assert_eq!(class, Some(super::APP_ID));+ }}diff --git a/contributors/people.toml b/contributors/people.tomlindex 3f346cd55..c88e91598 100644--- a/contributors/people.toml+++ b/contributors/people.toml@@ -79,3 +79,8 @@ sync_github_name = truereal_name = "Bryan Mark"display_name = "Arcanii"sync_github_name = false++[people.atoslins]+real_name = "Atos Lins"+display_name = "Atos Lins"+sync_github_name = falsediff --git a/packaging/linux/ai.storyteller.pdfcraft.desktop b/packaging/linux/ai.storyteller.pdfcraft.desktopindex f7928d62b..1e091ba05 100644--- a/packaging/linux/ai.storyteller.pdfcraft.desktop+++ b/packaging/linux/ai.storyteller.pdfcraft.desktop@@ -8,7 +8,7 @@ TryExec=pdfcraftIcon=ai.storyteller.pdfcraftTerminal=falseStartupNotify=true-StartupWMClass=pdfcraft+StartupWMClass=ai.storyteller.pdfcraftCategories=Office;Viewer;Keywords=pdf;viewer;editor;annotate;sign;forms;merge;split;MimeType=application/pdf;