revised occurences of draw_client.*, should be more robust now (though urxvt is broken if run with -tr, not our problem)

This commit is contained in:
Anselm R. Garbe 2006-04-28 12:37:19 +02:00
parent 41ebe974c9
commit ec111a5c9d
7 changed files with 26 additions and 20 deletions

View File

@ -11,3 +11,12 @@
- partly EWMH support
- libixp: idea from PoP: implement a va_args method similiar to printf for
marshalling 9P messages, might reduce LOC drastically
We also thought already about simplifying the mode concept of
columns, but with a quite different approach. What you describe
is already possible in default mode (even through writing to
geom files, though I plan to remove the geom syntax as it is now
(with the +- stuff, and only allowing explicit coordinates,
instead additionally resize +/-<w> +/-<h> and move +/-<x> +/-<y>
actions are needed in the associated ctl devices of clients.

View File

@ -144,8 +144,7 @@ select_area(Area *a, char *arg)
if(new->frame.size)
focus_client(new->frame.data[new->sel]->client, True);
v->sel = i;
for(i = 0; i < a->frame.size; i++)
draw_client(a->frame.data[i]->client);
draw_clients();
}
void

View File

@ -122,8 +122,6 @@ focus_client(Client *c, Bool restack)
v->sel = i;
f->area->sel = idx_of_frame(f);
if(old)
draw_client(old);
if(restack)
restack_view(v);
else {
@ -135,7 +133,10 @@ focus_client(Client *c, Bool restack)
if(i > 0 && f->area->mode == Colstack)
arrange_column(f->area, False);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
if(old)
draw_client(old);
draw_client(c);
XSync(dpy, False);
snprintf(buf, sizeof(buf), "ClientFocus %d\n", idx_of_client_id(c->id));
write_event(buf);
}
@ -384,6 +385,7 @@ manage_client(Client *c)
update_views();
map_client(c);
XMapWindow(dpy, c->framewin);
XSync(dpy, False);
if(c->frame.data[c->sel]->area->view == view.data[sel])
focus_client(c, False);
flush_events(EnterWindowMask);
@ -698,10 +700,11 @@ client_of_win(Window w)
void
draw_clients()
{
unsigned int i, j;
for(i = 0; i < client.size; i++)
for(j = 0; j < client.data[i]->frame.size; j++)
if(client.data[i]->frame.data[j]->area->view == view.data[sel])
draw_client(client.data[i]);
unsigned int i;
for(i = 0; i < client.size; i++) {
Client *c = client.data[i];
if(c->frame.size && (c->frame.data[c->sel]->area->view == view.data[sel]))
draw_client(c);
}
}

View File

@ -1464,9 +1464,7 @@ xwrite(IXPConn *c, Fcall *fcall)
if(m->qid.dir_type == FsDarea) {
view.data[i1]->area.data[i2]->mode = i;
arrange_column(view.data[i1]->area.data[i2], True);
if(view.data[i1]->area.data[i2]->frame.size == 1) /* little hack to update the tagbar */
draw_client(view.data[i1]->area.data[i2]
->frame.data[view.data[i1]->area.data[i2]->sel]->client);
draw_clients();
}
else
def.colmode = i;

View File

@ -30,6 +30,8 @@ typedef struct {
} Rule;
VECTOR(RuleVector, Rule *);
VECTOR(PropVector, char *);
static RuleVector rule;
static Vector *
@ -38,8 +40,6 @@ vector_of_rules(RuleVector *rv)
return (Vector *) rv;
}
VECTOR(PropVector, char *);
static Vector *
vector_of_props(PropVector *pv)
{
@ -134,7 +134,6 @@ update_rules()
update_views();
}
static void
match(Client *c, PropVector prop)
{

View File

@ -88,20 +88,20 @@ focus_view(View *v)
update_frame_selectors(v);
/* gives all(!) clients proper geometry (for use of different tags) */
if((c = sel_client_of_view(v)))
focus_client(c, True);
for(i = 0; i < client.size; i++)
if(client.data[i]->frame.size) {
Frame *f = client.data[i]->frame.data[client.data[i]->sel];
if(f->area->view == v) {
XMoveWindow(dpy, client.data[i]->framewin, f->rect.x, f->rect.y);
resize_client(client.data[i], &f->rect, False);
draw_client(client.data[i]);
}
else
XMoveWindow(dpy, client.data[i]->framewin,
2 * rect.width + f->rect.x, f->rect.y);
}
if((c = sel_client_of_view(v)))
focus_client(c, True);
draw_clients();
update_view_bars();
XSync(dpy, False);
XUngrabServer(dpy);

View File

@ -5,9 +5,7 @@ wmiiwm \- window manager improved 2 (core)
.B wmiiwm
.RB \-a
.IR <address>
.br
.RB [ \-c ]
.br
.RB [ \-v ]
.SH DESCRIPTION
.SS Overview