mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Return app ids with ".desktop" appended to Shell.Introspect
This isn't the correct solution, but it seems to work often enough for window icons in the screencast dialog.
This commit is contained in:
+9
-2
@@ -2184,7 +2184,7 @@ impl State {
|
||||
self.niri.dynamic_cast_id_for_portal.get(),
|
||||
gnome_shell_introspect::WindowProperties {
|
||||
title: String::from("niri Dynamic Cast Target"),
|
||||
app_id: String::from("rs.bxt.niri"),
|
||||
app_id: String::from("rs.bxt.niri.desktop"),
|
||||
},
|
||||
);
|
||||
|
||||
@@ -2193,7 +2193,14 @@ impl State {
|
||||
let props = with_toplevel_role(mapped.toplevel(), |role| {
|
||||
gnome_shell_introspect::WindowProperties {
|
||||
title: role.title.clone().unwrap_or_default(),
|
||||
app_id: role.app_id.clone().unwrap_or_default(),
|
||||
app_id: role
|
||||
.app_id
|
||||
.as_ref()
|
||||
// We don't do proper .desktop file tracking (it's quite involved), and
|
||||
// Wayland windows can set any app id they want. However, this seems to
|
||||
// work well enough in practice.
|
||||
.map(|app_id| format!("{app_id}.desktop"))
|
||||
.unwrap_or_default(),
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user