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

From: Nicolas Capit <capitn_AT_free.fr>
Date: Wed, 25 May 2011 14:26:42 +0200

Hello,

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

capitn

On Tue, 24 May 2011 23:44:06 +0300
Bogdan Ionuț <bogdan_AT_punctweb.ro> wrote:

> On Sat, May 14, 2011 at 18:53, Bogdan Ionuț <bogdan_AT_punctweb.ro> wrote:
>
> > Hello guys,
> >
> > I'm using dwm-hg aka dwm 5.9 with dwm-5.8.2-pertag_without_bar.diff, and I
> > have a problem with layouts and setfocus "feature" (commit 7e2a8fec8d6c).
> > Firefox by default is using tag 9, so go to tag 9 and set monocle layout,
> > after go to tag 1 and start firefox from this tag using tile layout. Now
> > firefox should start and tags switched from 1 to 9, but 'cause of the
> > setfocus feature is using the layout from the old tag (tile) in the new tag
> > (which should be monocle), but if you switch tags using the keyboard (eg.
> > mod+1, mod+9), the correct layout is shown in tag 9. Sorry for the long
> > story, but this is getting more and more annoying as I use ~2-3 apps in
> > monocle layout all the time in the `web` tag. Any workaround for this?
> >
>
> I find out it's related to commit 40ea9ad70440, and this dirty patch seems
> to fix my issue.
>
> --- a/dwm.c 2011-05-24 23:38:52.799999994 +0300
> +++ b/dwm.c 2011-05-24 23:39:40.543000014 +0300
> @@ -582,8 +582,8 @@ clientmessage(XEvent *e) {
> }
> else if(cme->message_type == netatom[NetActiveWindow]) {
> if(!ISVISIBLE(c)) {
> - c->mon->seltags ^= 1;
> - c->mon->tagset[c->mon->seltags] = c->tags;
> + Arg a = { .ui = c->tags };
> + view(&a);
> }
> pop(c);
> }
Received on Wed May 25 2011 - 14:26:42 CEST

This archive was generated by hypermail 2.2.0 : Wed May 25 2011 - 14:36:02 CEST