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 */
--
Received on Thu Sep 17 2009 - 11:49:53 UTC
This archive was generated by hypermail 2.2.0 : Thu Sep 17 2009 - 12:24:01 UTC