gui: set app_id so Wayland compositors match the desktop icon
Build Debug APK / build (push) Failing after 18m43s
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:
@@ -3,5 +3,6 @@ Name=Synchronicity
|
||||
Comment=Personal Data Store
|
||||
Exec=syn-gui
|
||||
Icon=synchronicity
|
||||
StartupWMClass=synchronicity
|
||||
Type=Application
|
||||
Categories=Utility;Network;
|
||||
|
||||
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user