Bug 1311626 - pymol window WM_CLASS doesn't match .desktop file
Summary: pymol window WM_CLASS doesn't match .desktop file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pymol
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Fenn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-24 15:46 UTC by Sebastian Keller
Modified: 2016-07-05 08:25 UTC (History)
1 user (show)

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:
Clone Of:
Environment:
Last Closed: 2016-07-05 04:59:17 UTC
Type: Bug
Embargoed:


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

Description Sebastian Keller 2016-02-24 15:46:15 UTC
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 15:47:08 UTC
Created attachment 1130247 [details]
set the WM_CLASS property on the pymol external GUI

Comment 2 Fedora Update System 2016-03-13 20:09:52 UTC
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 20:09:57 UTC
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 20:12:21 UTC
Thanks for the patches!  I've added them, but I'll also ping upstream.

Comment 5 Fedora Update System 2016-03-15 21:32:08 UTC
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 15:24:20 UTC
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-26 03:41:48 UTC
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-26 03:41:56 UTC
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 19:24:08 UTC
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 19:26:07 UTC
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 04:59:14 UTC
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 08:25:00 UTC
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.