gui: set app_id so Wayland compositors match the desktop icon
Build Debug APK / build (push) Failing after 18m43s

WindowOptions.app_id was left unset, so KWin (and likely other Wayland
compositors) had nothing to match against synchronicity.desktop's
Icon= for surfaces like Alt-Tab — they fell back to a generic icon
even though the taskbar (which matches more loosely) showed the right
one. Set app_id to "synchronicity", matching the desktop file's base
name, and add StartupWMClass for the same match on X11/XWayland.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Greg Shuflin
2026-07-06 20:32:45 -07:00
parent f07366e6ea
commit 3fc60ec947
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -3,5 +3,6 @@ Name=Synchronicity
Comment=Personal Data Store
Exec=syn-gui
Icon=synchronicity
StartupWMClass=synchronicity
Type=Application
Categories=Utility;Network;
+7
View File
@@ -260,6 +260,13 @@ fn main() {
..Default::default()
}),
window_bounds: Some(WindowBounds::Windowed(bounds)),
// Must match the `synchronicity.desktop` file's base name so
// Wayland compositors (e.g. KWin) can look up its `Icon=` for
// window-switcher/Alt-Tab surfaces — without this the window
// has no app id to match against and falls back to a generic
// icon there, even though the taskbar (which matches more
// loosely) shows the right one.
app_id: Some("synchronicity".to_string()),
..Default::default()
};
if let Err(err) = cx.open_window(window_options, |window, cx| {