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:
parent
e7f9e95440
commit
223c7855cf
5 changed files with 38 additions and 30 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue