-
Notifications
You must be signed in to change notification settings - Fork 33
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
add StartupWMClass to the desktop file #45
base: master
Are you sure you want to change the base?
Conversation
Confirmation of bug: |
@ricardomv Could you please take a look and merge this? |
@alesguzik I tried your change but the 2nd instance problem still remain. I tried it on a KDE desktop. |
@rickysarraf does it assign the icon? If it does, then it means it works. On Gnome run-or-raise is a default behaviour, apps don't need to implement anything for it to work. I have just tested a few Qt-based apps and they explicitly implement the logic that if a second instance of the app is launched it will switch to it and terminate itself. Maybe KDE assumes that apps should run the second time by-default and smarter apps would handle switching, whereas apps that don't implement anything would just run twice. How do other GTK apps behave? You can try gedit, for example. |
The change make sense and looks good to me.
|
f03366b
to
64dffff
Compare
@andrewshadura fixed, thanks |
This is necessary so that GNOME and others window managers can associate the application window with the launcher icon. Without StartupWMClass, GNOME dock would display another icon for the application when it’s launched instead of adding a dot to show the app is running to the already existing one.
64dffff
to
1c1dbe9
Compare
Thanks for explaining. Given that, this may be an oddity in KDE then. I just tested the same use case, with a native KDE applicaiton, Konsole. And it does run a new instance when clicking the app icon, rather than switching to the current running instance. OTOH, a Qt based app like Clementine behaved just like you described. |
This allows GNOME (and other desktops, as far as I understand) to match snapper launcher icon and snapper windows. Without this change when you click on the Snapper GUI icon in gnome dock it will start the app, but instead of displaying a dot next to the icon showing that the app is running, it will add a new icon without a picture, and that will have a dot. Also without this change when you click on the icon it would start a new instance instead of switching to the running one.