Bug 1311626 - pymol window WM_CLASS doesn't match .desktop file
pymol window WM_CLASS doesn't match .desktop file
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: pymol (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Fenn
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-24 10:46 EST by Sebastian Keller
Modified: 2016-07-05 04:25 EDT (History)
1 user (show)

See Also:
Fixed In Version: pymol-1.8.2.2-1.20160625svn4159.fc24 pymol-1.8.2.2-1.20160625svn4159.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-05 00:59:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
set the WM_CLASS property on the pymol main window (2.36 KB, patch)
2016-02-24 10:46 EST, Sebastian Keller
no flags Details | Diff
set the WM_CLASS property on the pymol external GUI (459 bytes, patch)
2016-02-24 10:47 EST, Sebastian Keller
no flags Details | Diff

  None (edit)
Description Sebastian Keller 2016-02-24 10:46:15 EST
Created attachment 1130246 [details]
set the WM_CLASS property on the pymol main window

The main window (the OpenGL one) of pymol doesn't specify the WM_CLASS property for its window. This property is used to match windows to .desktop files in certain desktop environments, such as gnome. Without this matching one can observe several smaller issues in gnome-shell:
- Windows are not grouped by application in Alt+Tab
- Windows are missing the icon in Alt+Tab
- The application title in the top panel differs from the one in the .desktop file
- The application icon is missing from the top panel
- The entry in the dash (the panel on the left) in the activities overview is missing the proper icon
- The entry in the dash can't be marked as favorite
- The entry from the "All Applications" list can be marked as favorite, but when used to launch pymol, entries for each window show up in the dash

Some of those affect the gnome-shell "classic" mode as well. With this additional issues:
- The icon is missing from window list in the bottom

The external GUI component of pymol (the Tk window) is not missing the WM_CLASS property but defaults to a Tk specific WM_CLASS which doesn't match the pymol.desktop file either.

I have written two patches to add this property to both, the main window and the external GUI.

I'm submitting these patches as downstream patches rather than upstream for multiple reasons:
1.) They are only useful in combination with a .desktop file which only gets added downstream
2.) The patch for the main window is a bit hack-ish, but GLUT doesn't allow to do this cleanly. I've tried to keep this very contained and guarded against everything that might break though. A cleaner solution would require to port pymol away from GLUT to something like SDL which would be much more work and I'm not sure if that is even something that would be desirable.
3.) The patches as they are would probably compile on linux only. (That could be fixed with a couple of #ifdefs though)

And one final note about the patch for the external GUI: This doesn't fix every possible dialog of the external GUI but just the window that opens when you start pymol. Fixing everything would basically require patching every call to Tk() and Toplevel() scattered through the code which would make maintaining this patch much harder for very little gain.

I've tested these patches on F24 against the latest pymol package.
Comment 1 Sebastian Keller 2016-02-24 10:47 EST
Created attachment 1130247 [details]
set the WM_CLASS property on the pymol external GUI
Comment 2 Fedora Update System 2016-03-13 16:09:52 EDT
pymol-1.8-4.20151208svn4142.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f67877715b
Comment 3 Fedora Update System 2016-03-13 16:09:57 EDT
pymol-1.8-4.20151208svn4142.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5da5655d5e
Comment 4 Tim Fenn 2016-03-13 16:12:21 EDT
Thanks for the patches!  I've added them, but I'll also ping upstream.
Comment 5 Fedora Update System 2016-03-15 17:32:08 EDT
pymol-1.8-4.20151208svn4142.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5da5655d5e
Comment 6 Fedora Update System 2016-03-16 11:24:20 EDT
pymol-1.8-4.20151208svn4142.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f67877715b
Comment 7 Fedora Update System 2016-06-25 23:41:48 EDT
pymol-1.8.2.2-1.20160625svn4159.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-915de71507
Comment 8 Fedora Update System 2016-06-25 23:41:56 EDT
pymol-1.8.2.2-1.20160625svn4159.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-06eeb5f89a
Comment 9 Fedora Update System 2016-06-26 15:24:08 EDT
pymol-1.8.2.2-1.20160625svn4159.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-06eeb5f89a
Comment 10 Fedora Update System 2016-06-26 15:26:07 EDT
pymol-1.8.2.2-1.20160625svn4159.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-915de71507
Comment 11 Fedora Update System 2016-07-05 00:59:14 EDT
pymol-1.8.2.2-1.20160625svn4159.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-07-05 04:25:00 EDT
pymol-1.8.2.2-1.20160625svn4159.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.