Hi, we are aware of this issue. Your proposed change is changing the symptoms but not the cause. I'll provide a fix later today or tomorrow that fixes the cause and prevents the reallocation of the monitors structs.
Kind regards, Anselm 2009/9/17 Madhu <[email protected]>: > The `Root ConfigureNotify resets layout' bug is seen with Wine > applications and other desktops that call configure notify on the root > window. You get moved to tag 1 which gets reset to default layout. > > As a workaround, this patch (against hg 1489) changes `updategeom' so as > to set the default fields of a newly created Monitor to current values > in selmon. -- Madhu. > > --- > dwm.c | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/dwm.c b/dwm.c > index 0bf3c29..c43031f 100644 > --- a/dwm.c > +++ b/dwm.c > @@ -1861,14 +1861,15 @@ updategeom(void) { > /* bar geometry setup */ > for(m = newmons; m; m = m->next) { > m->sel = m->stack = m->clients = NULL; > - m->seltags = 0; > - m->sellt = 0; > - m->tagset[0] = m->tagset[1] = 1; > + m->seltags = (selmon?selmon->seltags:0); > + m->sellt = (selmon?selmon->sellt:0); > + m->tagset[0] = (selmon?selmon->tagset[0]:1); > + m->tagset[1] = (selmon?selmon->tagset[1]:1); > m->mfact = mfact; > m->showbar = showbar; > m->topbar = topbar; > - m->lt[0] = &layouts[0]; > - m->lt[1] = &layouts[1 % LENGTH(layouts)]; > + m->lt[0] = (selmon?selmon->lt[0]:&layouts[0]); > + m->lt[1] = (selmon?selmon->lt[1]:&layouts[1 % > LENGTH(layouts)]); > updatebarpos(m); > } > /* reassign left over clients of disappeared monitors */ > -- > >
