07:17 zzag: Has anyone looked in the past into making sure that flatpak apps use correct desktop files? For example, spotify desktop app specifies "spotify" file while the desktop file name is "com.spotify.Client"
07:18 zzag: I tried using the security context app id but the problem is that there are applications that change their app id
07:18 zzag: e.g. libreoffice
07:18 zzag: it starts with some generic app id and then changes it some concrete app id
07:19 zzag: wasn't particularly fan of that xdg_toplevel.set_app_id change but we have it in the spec now, so I wonder what can be done to fix wrong desktop files
07:20 zzag: specifies "spotify" file -> specifies "spotify" app id
07:22 zzag: in Plasma, we allow creating window rules to force using another desktop file, but it's not a scalable solution and it's not great for users
09:44 d_ed[m]: See gnome-shell get_app_for_window
09:46 d_ed[m]: it seems they use the sandbox id as a prefix
09:46 d_ed[m]: so you can do a sandbox of org.libreoffice
09:46 d_ed[m]: then the app ask for org.libreoffice.excel or whatever
10:15 zzag: d_ed[m]: iiuc gnome shell does what I attempted to do in kwin https://github.com/GNOME/gnome-shell/blob/35beb976b71304c86b1a7e1c75ed5b0912908350/src/shell-window-tracker.c#L426
10:15 zzag: oops, sorry I missed https://github.com/GNOME/gnome-shell/blob/35beb976b71304c86b1a7e1c75ed5b0912908350/src/shell-window-tracker.c#L228
10:16 zzag: still, it's unclear how it can be of use
10:18 d_ed[m]: * See gnome-shell get_app_from_window_wmclass
10:19 zzag: Oh, so gnome shell matches flatpak desktop files by WM_CLASS?
10:21 kennylevinsen: I think you're also discussing two problems: that xdg_shell app_id will not always match the .desktop file path, and that some apps utilize multiple app_id's and switch between them at runtime, each with its own .desktop file
10:24 zzag: kennylevinsen: yeah, part of the problem is that sandboxed applications have desktop files whose names don't match app ids in xdg_toplevel.set_app_id
10:24 zzag: because flatpaks and snaps have different naming conventions
10:27 kennylevinsen: that will sometimes be true even without the sandbox I think
10:28 kennylevinsen: but what I found when glancing around was that StartupWMClass= seems to match the intended app_id
10:28 kennylevinsen: although in one cases on my system only case insensitively