Skip to content

Qt4 backend windows don't have WM_CLASS property #4746

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

Closed
woky opened this issue Jul 19, 2015 · 6 comments
Closed

Qt4 backend windows don't have WM_CLASS property #4746

woky opened this issue Jul 19, 2015 · 6 comments
Assignees
Labels
GUI: Qt MEP: MEP27 decouple pyplot from backends New feature
Milestone

Comments

@woky
Copy link

woky commented Jul 19, 2015

$ xprop|grep WM_CLASS # click on a matplotlib figure
WM_CLASS(STRING) = " ", " "

Without unique class name it's almost impossible to match and make the figure window floating in tiling WMs (like i3, Xmonad, ...).

@OceanWolf OceanWolf self-assigned this Jul 20, 2015
@OceanWolf OceanWolf added MEP: MEP27 decouple pyplot from backends New feature labels Jul 20, 2015
@OceanWolf
Copy link
Member

Thanks @woky for telling us about this. Currently I work on refactoring all the windowing code, so consider this on my todo list when I continue the work on the qt backend.

In your opinion, should all matplotlib windows have the same class, or should we differentiate between plot windows and other windows such as the subplot config window?

@woky
Copy link
Author

woky commented Jul 20, 2015

@OceanWolf Thank you for your efforts.

All programs I've checked so far use one only single class name (well, two, but both same). For instance all Octave figures have

WM_CLASS(STRING) = "Octave", "Octave"

which is fine because Octave GUI elements I use are only figures which I want floating most of time. However, in some programs I wish for different types of windows to have different classes (for instance to make diff window floating in Intellij IDEA). As far as I know all sane tiling WMs can match class by wildcard or regex so if all classes started with matplotlib_ it'd still be easy to match all matplotlib windows (or perhaps more classes could be used). But for me, there'd not be much use for it here as I want all figure related windows floating. So I think it should be what you find most simple and elegant =).

@tacaswell tacaswell added this to the proposed next point release milestone Jul 20, 2015
@tacaswell
Copy link
Member

I looked into doing something about this awhile ago and got lost in the details of where you set this in pyqt.

I don't know if any of the other backends do this either.

@wmvanvliet
Copy link

some backends do set something, others do not (notably the qt4agg backend doesn't set anything)

@languitar
Copy link
Contributor

This is also valid for the Qt5Agg in recent matplotlib versions.

@anntzer
Copy link
Contributor

anntzer commented Aug 31, 2017

Should be closed by #8394 (except for WX which doesn't expose such an API at all, and for macos where it isn't even clear that WM_CLASS exists at all). Feel free to reopen if a solution appears for WX or if this is actually useful on OSX as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: Qt MEP: MEP27 decouple pyplot from backends New feature
Projects
None yet
Development

No branches or pull requests

6 participants