Re: [dev] [dwm] adding WM_WINDOW_ROLE rule

From: Ethan Grammatikidis <eekee57_AT_fastmail.fm>
Date: Tue, 27 Jul 2010 00:53:12 +0100

On 26 Jul 2010, at 11:48, Rob wrote:

> On 26 July 2010 22:32, David DEMELIER <demelier.david_AT_gmail.com>
> wrote:
>> Hello dear dwm users,
>
> hi
>
>> There is something that make me sad with dwm, there is a lack of role
>> rules for clients. I explain : clients have instance and name using
>> WM_CLASS, but there is also WM_WINDOW_ROLE which is really important
>> and useful.

Pardon me for ranting, but WM_WINDOW_ROLE looks like nothing more
than brain-damage from freedesktop.org monks who had to "reason" away
perfectly sound usage of WM_CLASS. I'm upset because this broke a
window manager I got on with rather well, but I honestly wonder how
close the reasoning behind this issue is to that of the 12th-century
monks who wrote down, as a factual example for human life, that a
badger when pursued by dogs would bite it's own balls off because it
knew that's what the dogs were really after!

I'm not kidding, monks really wrote that down. That and other things
believed by medieval monks who could be very intellectual folk led me
to the conclusion that human reason untrammelled by facts and
practical sense will produce the stupidest beliefs.

>
> dwm uses XGetClassHint() to retrieve the class and instance, and you
> can't get WM_WINDOW_ROLE like this, so it's not as trivial to add on.
>
> I've attached a patch (with some dodgy casting) that works for me, but
> it's pretty useless. To have rules work with lots of arbitary WM_*
> rules would mean extending the code a lot for little gain - Iron
> (chromium clone) doesn't set WM_WINDOW_ROLE, for example, and nor does
> surf, nor vimprobable.
>
> tl;dr:
>> However I doubt that many client make
>> actually use of WM_WINDOW_ROLE in a consistent way, which is why I
>> believe there is no great benefit in doing so -- or in other words,
>> yet another proof how hideous X has become ;)

An idea crossed my mind, I don't know if it's worth anything. I
thought of adding a pair of fields to dwm's window-matching array to
match any X property set on a window. I don't know how the typing
would work, perhaps it could involve a pointer to a union? Also it
could be a nuisance to those with long window-matching lists.

>
> Rob
> <dwm-5.8.2-WM_WINDOW_ROLE.diff>
Received on Tue Jul 27 2010 - 01:53:12 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 27 2010 - 02:00:03 CEST