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

Create fake app info for unknown windows #330

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

Conversation

lenemter
Copy link
Member

@lenemter lenemter commented Dec 5, 2024

Fixes #310 (Basecamp app)

Some windows run in portable mode (for example AppImages) and they do not provide any .desktop files by default. Right now Dock doesn't even show these windows. This branch constructs fake app info for them and always shows them.

I couldn't find a way to trick GLib.DesktopAppInfo into using fake data, so I created a wrapper for it.

@danirabbit
Copy link
Member

I'm really nervous about implementing workarounds for apps that don't follow standards and the new bugs that might create

@leolost2605
Copy link
Member

Only on a technical note, if we want it, I think it might be worth looking into shipping an io.elementary.dock.unknown.desktop file with Unknown as app name and either nothing or something like notify-send "Tried to launch unknown app" as executable and using that instead of wrapping GLib.DesktopAppInfo. 🤷

@lenemter
Copy link
Member Author

lenemter commented Dec 5, 2024

@danirabbit I'm not sure about this as well. On the one hand I don't want to support apps that don't follow desktop file standards. But on the other it just feels weird that the dock displays 'apps' and not 'windows', that the dock windows list and the Alt+Tab list may not be the same. If you choose to not merge this, I'll be ok with that.

@lenemter
Copy link
Member Author

lenemter commented Dec 5, 2024

@leolost2605 there's a flaw in this. The window might have a title. Using unknown.desktop file will always display it as "Unknown" where here it will be display a window title.

@leolost2605
Copy link
Member

Ah right though since the dock shows apps not windows I guess it might be debatable whether the window title should be favored over an "app name" Unknown.
But another flaw would also be that windows belonging to different apps would show under the same "Unknown" app so maybe not optimal indeed.

@teamcons
Copy link

teamcons commented Dec 5, 2024

I'm really nervous about implementing workarounds for apps that don't follow standards and the new bugs that might create

I get it, standards are nice for those that follows them
but imho we're in an imperfect world, so best to make sure the experience for enduser is ok regardless of others mess-ups

as long as it is clear this is a fallback and eOS is not to blame for anything missing but doing best it can

@danirabbit
Copy link
Member

danirabbit commented Dec 6, 2024

Providing a .desktop file is like the most basic standard though. Not providing one is severely broken. It's not just having a hard time complying with a standard or something obscure. It is the most basic and ubiquitous standard of proving a launcher file on all desktop environments. It's an old standard. Not doing this is fundamentally broken. It's not even possible to do this if you ship your app as Flatpak. That's how broken it is.

So basically this is a workaround for unsupported system modification that won't even be possible to do if we move to image based

@teamcons
Copy link

teamcons commented Dec 6, 2024 via email

@alainm23
Copy link

Regardless of the fact that the implementation is for a bug related to apps that don't follow the standard, I like the idea of creating a custom class to wrap around GLib.DesktopAppInfo. It gives us the opportunity to extend it by possibly adding features specific to Pantheon.

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