Re: [dev] Re: [dwm] dwm-hg, layouts, setfocus and pertag patch

From: garbeam <garbeam_AT_gmail.com>
Date: Sat, 11 Jun 2011 08:22:18 +0100

Hi,

On 25 May 2011 13:26, Nicolas Capit <capitn_AT_free.fr> wrote:
> I think this part of the code comes from the "NetActiveWindow" feature added in
> hg recently.
>
> I just tried the current hg dwm version and now everytime I click on an URL in
> my mailer the tag changes automatically and go where firefox is opened (firefox
> may call the NetActiveWindow).
> So it is not a behaviour that I like so I modified a little bit the code:
>
> ##################################################
> diff -r ba590e72eb2a dwm.c
> --- a/dwm.c     Sat May 21 20:26:26 2011 +0100
> +++ b/dwm.c     Wed May 25 14:22:26 2011 +0200
> @@ -556,8 +556,10 @@
>        }
>        else if(cme->message_type == netatom[NetActiveWindow]) {
>                if(!ISVISIBLE(c)) {
> -                       c->mon->seltags ^= 1;
> -                       c->mon->tagset[c->mon->seltags] = c->tags;
> +               //if(0) {
> +            c->isurgent = True;
> +               //      c->mon->seltags ^= 1;
> +               //      c->mon->tagset[c->mon->seltags] = c->tags;
>                }
>                pop(c);
> ##################################################
>
> Is it possible to put something in the config.h which will say what to do with
> the different netatom like NetActiveWindow (and maybe others) and so everyone
> can manage them in config.h? (I think it is not so simple, but...

I like the approach c->isurgent = True, but without the pop(c); The
problem however with your approach is, that c->isurgent will trigger a
clearurgent() on that window once it is focused, which is a bit
unclean.

Best regards,
--garbeam
Received on Sat Jun 11 2011 - 09:22:18 CEST

This archive was generated by hypermail 2.2.0 : Sat Jun 11 2011 - 09:24:02 CEST