wip fix: use app id for grouping window lists & replace top level if it already exists & show separator for active and saved app lists

This commit is contained in:
Ashley Wulber 2022-07-19 23:12:37 -04:00
parent e7f9e95440
commit 223c7855cf
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
5 changed files with 38 additions and 30 deletions

View file

@ -78,7 +78,7 @@ impl DockObject {
imp.saved.replace(is_saved);
}
pub fn from_search_results(results: BoxedWindowList) -> Self {
pub fn from_window_list(results: BoxedWindowList) -> Self {
let appinfo = if let Some(first) = results.0.get(0) {
xdg::BaseDirectories::new()
.expect("could not access XDG Base directory")
@ -95,7 +95,7 @@ impl DockObject {
if let Some(path) = path.to_str() {
if let Some(app_info) = gio::DesktopAppInfo::new(path) {
if app_info.should_show()
&& first.name.as_str() == app_info.name().as_str()
&& Some(&first.app_id) == app_info.id().map(|s| s.to_string()).as_ref()
{
return Some(app_info);
}