Skip to content

Conversation

@lenemter
Copy link
Member

@lenemter lenemter commented Dec 5, 2024

Fixes elementary/dock#282
Fixes elementary/dock#310 (TablePlus)

Gets process name from /proc/%d/comm and tries to get desktop file with that name. If it doesn't exist it tries to do the same with the parent process until we get to process 0.

@lenemter lenemter requested a review from a team December 5, 2024 14:58
@lenemter
Copy link
Member Author

lenemter commented Dec 5, 2024

This branch has a side effect. If an app with no app_info launched from Terminal, gala thinks the application belongs to the Terminal. Is this ok to proceed with this branch?

@danirabbit
Copy link
Member

I'm a bit worried this might also reintroduce the issue with duplicate launchers in the dock :/

@lenemter
Copy link
Member Author

lenemter commented Dec 5, 2024

@danirabbit our apps system (in both gala and dock) works on determining desktop file that belongs to an app. All this PR does is tries to match process name to a desktop file. If there is no duplicated desktop file, the bug will not appear.

I can't imagine an edge-case where two icons of the same app will appear

@danirabbit
Copy link
Member

Yeah I'm wondering in the case that there's a launcher but it can't be matched to the running window what will happen? Will it show a launcher for the panel or dock instead?

@lenemter
Copy link
Member Author

lenemter commented Dec 5, 2024

Gala will create a fake app with id "window:some number" which will not be associated with the actual app. Until elementary/dock#330 is merged this fake app will not be shown.

@leolost2605
Copy link
Member

This branch has a side effect. If an app with no app_info launched from Terminal, gala thinks the application belongs to the Terminal. Is this ok to proceed with this branch?

Is going through the parent processes needed for some apps you know about? If not or only very rarely maybe we hold off from doing that and maybe if we need it leave it to a later PR? I think this would solve some concerns @danirabbit had for now

@lenemter
Copy link
Member Author

lenemter commented Dec 5, 2024

Well it fixes the issue for GParted and TablePlus. Not sure if there are other affected apps

@danirabbit
Copy link
Member

TablePlus seems to be actively maintained. Maybe it would be better to help them provide a correct app ID? 😅

@leolost2605
Copy link
Member

Ah ok then I guess it's kind of needed 🤷
I don't have a strong opinion here then :)

@lenemter lenemter added this to OS 9 Mar 21, 2025
@lenemter lenemter moved this to Needs Discussion in OS 9 Mar 21, 2025
@lenemter lenemter closed this May 14, 2025
@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in OS 9 May 14, 2025
@lenemter lenemter deleted the lenemter/search-apps-by-pid-more-cleverly branch May 14, 2025 13:55
@lenemter lenemter removed this from OS 9 May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some apps are not showing up in the dock GParted does not show in the dock

4 participants