Skip to content
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

Spyder's WM_CLASS is empty, resulting in unexpected behavior for task managers #2207

Closed
rubenvb opened this issue Feb 26, 2015 · 11 comments
Closed
Assignees
Labels
Milestone

Comments

@rubenvb
Copy link

rubenvb commented Feb 26, 2015

I experience unwanted behavior from KDE's icon-only task manager, which groups the Spyder window with Mathematica for some reason. There is definitely a bug on their end, but the fact that WM_CLASS for the Spyder window is empty is also not good and giving this property a decent value may very well work around the issue.

Link to KDE bug report containing more information: https://bugs.kde.org/show_bug.cgi?id=344515

@eikehein
Copy link

I'm the upstream KDE developer who's handling the above ticket. It looks like WM_CLASS winds up empty when Spyder is run against Python 3; the Python 2-powered Fedora package puts "Spyder" and is fine. Current GitHub against Python 3.4: Not so.

@rubenvb
Copy link
Author

rubenvb commented Feb 26, 2015

For Arch packages at least, both Spyder under Python 2.7 and 3.4 have empty WM_CLASS. It seems Fedora fixes it in their package.

@eikehein
Copy link

There's no relevant patch in their package tree at least: http://pkgs.fedoraproject.org/cgit/spyder.git/tree/

But this is a pretty complex matrix of Spyder version, Python version, PyQt version and Qt version. E.g. regardless of whether Spyder is running against Python 2 or 3, it could be using either PyQt 4 or 5 to use Qt 4 or 5 - so the bug could also be in PyQt, or, albeit unlikely, even in Qt.

I don't have enough time to dig that deep though so at that point it's more efficient to hand this off to you Spyder folks :).

@ccordoba12
Copy link
Member

Ok, no problem. What do we need to do to set WM_CLASS?

@eikehein
Copy link

Qt should fill it in for you for the app's main window from the QApplication metadata. Can you look into whether you have forking codepaths in Spyder somewhere where something like setApplicationName (or similar) might wind up forgotten, or the window is created differently, ...?

@ccordoba12
Copy link
Member

We are not using setApplicationName when creating the window, so that should be the cause of this problem ;-) I'll fix it for our next bugfix release.

@ccordoba12 ccordoba12 self-assigned this Feb 26, 2015
@eikehein
Copy link

Thanks! If you mention the commit in this ticket I'll test on this end.

@ccordoba12
Copy link
Member

Sure, I'll do that!

@ccordoba12
Copy link
Member

@eikehein I used xprop to verify that our WM_CLASS is set correctly now. Please test it yourself to see if everything is right :-)

@eikehein
Copy link

Tested (sorry for the long wait), looks fine now!

@ccordoba12
Copy link
Member

Great!!

El 12/03/15 a las 09:03, eikehein escribió:

Tested (sorry for the long wait), looks fine now!


Reply to this email directly or view it on GitHub
#2207 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants