commit 01caae704088b190152565ad361f5942b06549a3
parent 829191aa19e29012c8550be4a03b8fe888dd8535
Author: garbeam <garbeam@localhost>
Date: Thu, 12 Jan 2006 17:44:06 +0200
fixed serious bug in /wm/default/area/
Diffstat:
6 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -29,12 +29,13 @@ void
focus_client(Client * c)
{
Frame *f = 0;
+ /*
static Client *old = nil;
if(old && (old != c)) {
ungrab_client(old, AnyModifier, AnyButton);
grab_client(old, AnyModifier, AnyButton);
- }
+ }*/
/* sel client */
ungrab_client(c, AnyModifier, AnyButton);
@@ -46,7 +47,7 @@ focus_client(Client * c)
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XSync(dpy, False);
invoke_wm_event(def[WM_EVENT_CLIENT_UPDATE]);
- old = c;
+ /*old = c;*/
}
void
diff --git a/cmd/wm/layout.c b/cmd/wm/layout.c
@@ -41,7 +41,7 @@ alloc_layout(Page * p, char *layout)
l->file[L_NAME]->after_write = handle_after_write_layout;
l->def = match_layout_def(layout);
l->def->init(l, nil);
- p->file[P_SEL_AREA]->content = l->file[L_PREFIX]->content;
+ p->file[P_SEL_LAYOUT]->content = l->file[L_PREFIX]->content;
return l;
}
@@ -59,7 +59,7 @@ focus_layout(Layout *l)
Page *p = l->page;
Frame *f;
p->sel = l;
- p->file[P_SEL_AREA]->content = l->file[L_PREFIX]->content;
+ p->file[P_SEL_LAYOUT]->content = l->file[L_PREFIX]->content;
if((f = l->def->sel(l)))
l->def->focus(f, False);
}
diff --git a/cmd/wm/page.c b/cmd/wm/page.c
@@ -34,10 +34,10 @@ alloc_page()
snprintf(buf, sizeof(buf), "/%d/name", (int)npages);
new->file[P_NAME] = wmii_create_ixpfile(ixps, buf, buf2);
snprintf(buf, sizeof(buf), "/%d/layout/", (int)npages);
- new->file[P_AREA_PREFIX] = ixp_create(ixps, buf);
+ new->file[P_LAYOUT_PREFIX] = ixp_create(ixps, buf);
snprintf(buf, sizeof(buf), "/%d/layout/sel", (int)npages);
- new->file[P_SEL_AREA] = ixp_create(ixps, buf);
- new->file[P_SEL_AREA]->bind = 1; /* mount point */
+ new->file[P_SEL_LAYOUT] = ixp_create(ixps, buf);
+ new->file[P_SEL_LAYOUT]->bind = 1; /* mount point */
snprintf(buf, sizeof(buf), "/%d/ctl", (int)npages);
new->file[P_CTL] = ixp_create(ixps, buf);
new->file[P_CTL]->after_write = handle_after_write_page;
diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c
@@ -603,7 +603,7 @@ void
handle_before_read(IXPServer * s, File * f)
{
char buf[64];
- if(f == def[WM_AREA_GEOMETRY]) {
+ if(f == def[WM_MANAGED_GEOMETRY]) {
snprintf(buf, 64, "%d %d %d %d", layout_rect.x, layout_rect.y,
layout_rect.width, layout_rect.height);
if(f->content)
@@ -629,8 +629,8 @@ handle_after_write(IXPServer * s, File * f)
} else if(f == def[WM_FONT]) {
XFreeFont(dpy, font);
font = blitz_getfont(dpy, def[WM_FONT]->content);
- } else if(f == def[WM_AREA_GEOMETRY]) {
- char *geom = def[WM_AREA_GEOMETRY]->content;
+ } else if(f == def[WM_MANAGED_GEOMETRY]) {
+ char *geom = def[WM_MANAGED_GEOMETRY]->content;
if(geom && strrchr(geom, ' ')) {
layout_rect = rect;
blitz_strtorect(&rect, &layout_rect, geom);
@@ -674,17 +674,16 @@ init_cursors()
static void
init_default()
{
- def[WM_DETACHED_FRAME] = ixp_create(ixps, "/detached/frame");
- def[WM_DETACHED_CLIENT] = ixp_create(ixps, "/detached/client");
+ def[WM_DETACHED_FRAME] = ixp_create(ixps, "/detached");
def[WM_TRANS_COLOR] =
wmii_create_ixpfile(ixps, "/default/transcolor",
BLITZ_SEL_FG_COLOR);
def[WM_TRANS_COLOR]->after_write = handle_after_write;
- def[WM_AREA_GEOMETRY] =
- wmii_create_ixpfile(ixps, "/default/layout/geometry",
+ def[WM_MANAGED_GEOMETRY] =
+ wmii_create_ixpfile(ixps, "/default/geometry",
BLITZ_SEL_FG_COLOR);
- def[WM_AREA_GEOMETRY]->after_write = handle_after_write;
- def[WM_AREA_GEOMETRY]->before_read = handle_before_read;
+ def[WM_MANAGED_GEOMETRY]->after_write = handle_after_write;
+ def[WM_MANAGED_GEOMETRY]->before_read = handle_before_read;
def[WM_SEL_BG_COLOR] =
wmii_create_ixpfile(ixps, "/default/sstyle/bgcolor",
BLITZ_SEL_BG_COLOR);
diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h
@@ -12,8 +12,8 @@
enum {
P_PREFIX,
P_NAME,
- P_AREA_PREFIX,
- P_SEL_AREA,
+ P_LAYOUT_PREFIX,
+ P_SEL_LAYOUT,
P_CTL,
P_LAST
};
@@ -43,9 +43,8 @@ enum {
enum {
WM_CTL,
WM_DETACHED_FRAME,
- WM_DETACHED_CLIENT,
WM_TRANS_COLOR,
- WM_AREA_GEOMETRY,
+ WM_MANAGED_GEOMETRY,
WM_SEL_BG_COLOR,
WM_SEL_BORDER_COLOR,
WM_SEL_FG_COLOR,
diff --git a/rc/wmiirc b/rc/wmiirc
@@ -71,9 +71,9 @@ fn barsucks {
wmiir write /bar/geometry $BAR_ALIGN
if (~ $BAR_ALIGN south)
- wmiir write /bar/event/resize 'val=`{wmiir read /bar/geometry|awk ''{print "+0 +0 +0 -"$4}''} wmiir write /wm/default/area/geometry $"val'
+ wmiir write /bar/event/resize 'val=`{wmiir read /bar/geometry|awk ''{print "+0 +0 +0 -"$4}''} wmiir write /wm/default/geometry $"val'
if not
- wmiir write /bar/event/resize 'val=`{wmiir read /bar/geometry|awk ''{print "+0 +"$4" +0 -"$4}''} wmiir write /wm/default/area/geometry $"val'
+ wmiir write /bar/event/resize 'val=`{wmiir read /bar/geometry|awk ''{print "+0 +"$4" +0 -"$4}''} wmiir write /wm/default/geometry $"val'
wmiir write /bar/ctl reset
wmiir write /bar/font $FONT