-
Notifications
You must be signed in to change notification settings - Fork 291
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
Fix unknown wmclass in linux (missing dock icon) #419
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1223,6 +1223,10 @@ def execapp(): | |
window = PyMOLQtGUI() | ||
window.setWindowTitle("PyMOL") | ||
|
||
# fix linux dash icon/missing wmclass | ||
QtCore.QCoreApplication.setApplicationName("PyMOL") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For me, the application name is already assert app.applicationName() == "PyMOL" |
||
QtGui.QGuiApplication.setDesktopFileName("org.pymol.PyMOL") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not use app.setDesktopFileName("org.pymol.PyMOL") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's been some time since I've read the docs on how to fix it, if I recall correctly it was because of transient pop ups without a parent. |
||
|
||
@commandoverloaddecorator | ||
def viewport(w=-1, h=-1, _self=None): | ||
window.viewportsignal.emit(int(w), int(h)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to be a problem with KDE or IceWM on X11. So I suggest to be more specific that this is a fix for "Gnome Dash".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have access to a system with KDE/Wayland? It seems that this is Wayland specific actually, since you can specify wmclass for xorg in the .desktop file directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under KDE/Wayland:
setDesktopFileName()
: Generic icon in taskbar ❌app.setDesktopFileName("org.pymol.PyMOL")
and launching from aorg.pymol.PyMOL.desktop
file withIcon=application-x-clementine
: Taskbar showsapplication-x-clementine
icon ✔️app.setDesktopFileName("org.pymol.PyMOL")
and launching from a differently named.desktop
file (e.g.PyMOL.desktop
): Generic icon in taskbar ❌There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do pop ups also have these icons? Or is it only the main window?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pop ups get the same icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great! I've updated the code to use
app
directly, as well as the comment