morgant / mlvwm

Macintosh-like Virtual Window Manager (official repo)
http://www2u.biglobe.ne.jp/~y-miyata/mlvwm.html
275 stars 8 forks source link

`Style` commands don't search `WM_WINDOW_ROLE` X window properties #43

Open morgant opened 6 months ago

morgant commented 6 months ago

It doesn't appear that the built-in Style command appname string (which accepts '*' & '?' wildcards; see mlvwm(1) manual page) can match against the WM_WINDOW_ROLE X window property. I believe it currently only matches against WM_CLASS or WM_NAME.

There are many X11 applications that have different types of windows which should have different styles, including the menu bar itself as well as various window features. For example, Claws Mail has WM_CLASS(STRING) = "claws-mail", "Claws-mail" set on all windows, but the WM_WINDOW_ROLE differs by the various window types:

A window with a mainwindow role should have different menu bar options than messageview or compose. So, it'd be very helpful to be able to define multiple Style commands for the same WM_CLASS, but differing WM_WINDOW_ROLE.


It appears that WM_WINDOW_ROLE is part of the ICCCM specification, see section 5. Session Management.