Skip to content

Qt4 backend windows don't have WM_CLASS property #4746

Closed

Description

@woky
$ 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, ...).

Activity

  1. self-assigned this
    on Jul 20, 2015
  2. OceanWolf commented on Jul 20, 2015

    @OceanWolf
    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?

  3. woky commented on Jul 20, 2015

    @woky
    Author

    @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 =).

  4. added this to the milestone on Jul 20, 2015
  5. tacaswell commented on Jul 20, 2015

    @tacaswell
    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.

  6. wmvanvliet commented on Aug 17, 2015

    @wmvanvliet

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

  7. languitar commented on Mar 28, 2017

    @languitar
    Contributor

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

  8. anntzer commented on Aug 31, 2017

    @anntzer
    Contributor

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions