PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Linux: StartupWMClass is the window's app id (#3481)
Atos Linsda3da0942c14
diff --git a/apps/photocraft/src/main.rs b/apps/photocraft/src/main.rsindex a267673aa..aee9eabca 100644--- a/apps/photocraft/src/main.rs+++ b/apps/photocraft/src/main.rs@@ -644,4 +644,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.photocraft.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 914c9ce30..4765d92ac 100644--- a/contributors/people.toml+++ b/contributors/people.toml@@ -104,6 +104,11 @@ sync_github_name = true[people.timothydaly1]display_name = "SyntaxError"+[people.atoslins]+real_name = "Atos Lins"+display_name = "Atos Lins"+sync_github_name = false+[people.axlecoffee]sync_github_name = truediff --git a/packaging/linux/ai.storyteller.photocraft.desktop b/packaging/linux/ai.storyteller.photocraft.desktopindex d1fb15ce8..70ce82148 100644--- a/packaging/linux/ai.storyteller.photocraft.desktop+++ b/packaging/linux/ai.storyteller.photocraft.desktop@@ -9,7 +9,7 @@ Icon=ai.storyteller.photocraftTerminal=false# The native runner does not complete desktop startup-notification handshakes.StartupNotify=false-StartupWMClass=photocraft+StartupWMClass=ai.storyteller.photocraftCategories=Graphics;2DGraphics;RasterGraphics;Photography;Keywords=photo;image;editor;psd;layers;retouch;paint;MimeType=application/x-photocraft;image/x-paintnet;image/openraster;image/vnd.adobe.photoshop;image/x-psd;image/x-psb;image/png;image/jpeg;image/tiff;image/webp;image/gif;image/bmp;image/x-tga;image/x-icon;image/vnd.microsoft.icon;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-exr;image/vnd.radiance;image/avif;image/qoi;