Re: [dev] [dwm] adding WM_WINDOW_ROLE rule

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Mon, 26 Jul 2010 19:35:05 -0400

On Mon, Jul 26, 2010 at 11:48:02PM +0100, Rob wrote:
>On 26 July 2010 22:32, David DEMELIER <demelier.david_AT_gmail.com> wrote:
>> 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.
>
>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.

Are you serious? I'm always in awe of Xlib's ludicrous
compliment of property getter/setter helper functions when none
of them would be necessary if it just had some remotely sensible
basic property accessor functions. wmii just does,

if(getprop_textlist(win, "WM_CLASS", &class))
        ...;

and

changeprop_textlist(win, "WM_CLASS", "STRING",
                    (char*[]){ "foo", "bar", 0 });

And it's just as simple, and a good deal cleaner.

-- 
Kris Maglione
Religion began when the first scoundrel met the first fool.
	--Voltaire
Received on Tue Jul 27 2010 - 01:35:05 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 27 2010 - 01:36:02 CEST