Some more cleanup

This commit is contained in:
Kris Maglione 2007-02-10 03:09:19 -05:00
parent 46a9db62ae
commit b220628d5e
4 changed files with 15 additions and 18 deletions

6
area.c
View File

@ -399,15 +399,15 @@ select_area(Area *a, char *arg) {
else {
if(sscanf(arg, "%d", &i) != 1)
return Ebadvalue;
for(new=view->area; i && new->next; new=new->next)
i--;
for(new=view->area; new->next; new=new->next)
if(!--i) break;;
}
focus_area(new);
return nil;
focus_client:
frame_to_top(p);
focus_client(p->client, True);
focus_client(p->client, False);
if(v == screen->sel)
restack_view(v);
flush_masked_events(EnterWindowMask);

View File

@ -9,8 +9,8 @@
static void update_client_name(Client *c);
static char *Ebadcmd = "bad command",
*Ebadvalue = "bad value";
static char Ebadcmd[] = "bad command",
Ebadvalue[] = "bad value";
#define CLIENT_MASK (StructureNotifyMask | PropertyChangeMask | EnterWindowMask)
#define ButtonMask (ButtonPressMask | ButtonReleaseMask)
@ -322,11 +322,11 @@ prop_client(Client *c, XPropertyEvent *e) {
case XA_WM_HINTS:
wmh = XGetWMHints(blz.dpy, c->win);
if(wmh->flags&XUrgencyHint && !client->urgent) {
write_event("Urgent 0x%x\n", client->win);;
write_event("Urgent 0x%x\n", client->win);
client->urgent = True;
}
else if(!(wmh->flags&XUrgencyHint) && client->urgent) {
write_event("NotUrgent 0x%x\n", client->win);;
write_event("NotUrgent 0x%x\n", client->win);
client->urgent = False;
}
break;
@ -638,7 +638,6 @@ send_client(Frame *f, char *arg) {
remove_frame(f);
insert_frame(tf, f, True);
arrange_column(a, False);
focus_client(c, True);
}
else if(!strncmp(arg, "down", 5)) {
if(!f->anext)
@ -646,19 +645,18 @@ send_client(Frame *f, char *arg) {
remove_frame(f);
insert_frame(f->anext, f, False);
arrange_column(a, False);
focus_client(c, True);
}
else {
if(sscanf(arg, "%d", &j) != 1)
return Ebadvalue;
for(to=v->area; to && j; to=to->next, j--);
for(to=v->area; to; to=to->next)
if(!--j) break;
send_to_area(to, a, f);
}
}else
return Ebadvalue;
flush_masked_events(EnterWindowMask);
if(f->view == screen->sel)
focus(f->client, True);
focus_client(f->client, True);
update_views();
return nil;
}

10
fs.c
View File

@ -59,11 +59,11 @@ enum { /* Dirs */
/* Error messages */
static char
*Enoperm = "permission denied",
*Enofile = "file not found",
*Ebadvalue = "bad value",
*Einterrupted = "interrupted",
*Ebadcmd = "bad command";
Enoperm[] = "permission denied",
Enofile[] = "file not found",
Ebadvalue[] = "bad value",
Einterrupted[] = "interrupted",
Ebadcmd[] = "bad command";
/* Macros */
#define QID(t, i) (((long long)((t)&0xFF)<<32)|((i)&0xFFFFFFFF))

1
wmii.h
View File

@ -285,7 +285,6 @@ extern char *send_client(Frame *f, char *arg);
extern char * message_client(Client *c, char *message);
extern void move_client(Client *c, char *arg);
extern void size_client(Client *c, char *arg);
extern void newcol_client(Client *c, char *arg);
extern Client *sel_client();
extern Frame *frame_of_win(Window w);
extern Client *client_of_win(Window w);