Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WindowTracker: Search desktop file by process name #2141

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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
src/WindowTracker.vala Show resolved Hide resolved
@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 :)

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
3 participants