From d3fbc57ee7e47352303b14f1683a7d694fc2ece1 Mon Sep 17 00:00:00 2001 From: Junior Martins Date: Fri, 10 Jan 2025 01:51:10 -0300 Subject: [PATCH 1/2] Fix unknown wmclass in linux (missing dock icon) --- modules/pmg_qt/pymol_qt_gui.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/pmg_qt/pymol_qt_gui.py b/modules/pmg_qt/pymol_qt_gui.py index 6e935b0d6..a07254dfd 100644 --- a/modules/pmg_qt/pymol_qt_gui.py +++ b/modules/pmg_qt/pymol_qt_gui.py @@ -1223,6 +1223,10 @@ def execapp(): window = PyMOLQtGUI() window.setWindowTitle("PyMOL") + # fix linux dash icon/missing wmclass + QtCore.QCoreApplication.setApplicationName("PyMOL") + QtGui.QGuiApplication.setDesktopFileName("org.pymol.PyMOL") + @commandoverloaddecorator def viewport(w=-1, h=-1, _self=None): window.viewportsignal.emit(int(w), int(h)) From f88b51ef3081bc1b7779a9835e7b4a1bfc0d4368 Mon Sep 17 00:00:00 2001 From: jrom99 <47498278+jrom99@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:59:34 -0300 Subject: [PATCH 2/2] Use app.setDesktopFileName instead of the class name --- modules/pmg_qt/pymol_qt_gui.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/pmg_qt/pymol_qt_gui.py b/modules/pmg_qt/pymol_qt_gui.py index a07254dfd..8280af54b 100644 --- a/modules/pmg_qt/pymol_qt_gui.py +++ b/modules/pmg_qt/pymol_qt_gui.py @@ -1223,9 +1223,8 @@ def execapp(): window = PyMOLQtGUI() window.setWindowTitle("PyMOL") - # fix linux dash icon/missing wmclass - QtCore.QCoreApplication.setApplicationName("PyMOL") - QtGui.QGuiApplication.setDesktopFileName("org.pymol.PyMOL") + # fix gnome/wayland dash icon/missing wmclass + app.setDesktopFileName("org.pymol.PyMOL") @commandoverloaddecorator def viewport(w=-1, h=-1, _self=None):