mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
Linux: StartupWMClass is the window's app id (#1087)
* Linux: StartupWMClass is the window's app id The desktop entry said StartupWMClass=pdfcraft, but the window carries the app id ai.storyteller.pdfcraft (APP_ID) on Wayland and under X11 alike, so nothing that matches a window to its launcher by that key ever matched it: on X11 the launch's startup notification can't end when the window maps. VectorCraft, GridCraft and WordCraft already use the app id. A test reads the entry and compares it with APP_ID. * Contributors: add atoslins (Atos Lins) --------- Co-authored-by: Brandon Thomas <[email protected]>
This commit is contained in:
1 parent
2fbce7028c
commit
ea1df6e1cb
3 files changed
+15
-1
No files matched your search
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -79,3 +79,8 @@ sync_github_name = true
|
||||
real_name = "Bryan Mark"
|
||||
display_name = "Arcanii"
|
||||
sync_github_name = false
|
||||
|
||||
[people.atoslins]
|
||||
real_name = "Atos Lins"
|
||||
display_name = "Atos Lins"
|
||||
sync_github_name = false
|
||||
@@ -8,7 +8,7 @@ TryExec=pdfcraft
|
||||
Icon=ai.storyteller.pdfcraft
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
StartupWMClass=pdfcraft
|
||||
StartupWMClass=ai.storyteller.pdfcraft
|
||||
Categories=Office;Viewer;
|
||||
Keywords=pdf;viewer;editor;annotate;sign;forms;merge;split;
|
||||
MimeType=application/pdf;
|
||||
Reference in new issue
Block a user