wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit b220628d5e9f853e96818b1bc2f0045936515ad0
parent 46a9db62ae32dadb1eb774e5e03459e1bbafc6f1
Author: Kris Maglione <jg@suckless.org>
Date:   Sat, 10 Feb 2007 03:09:19 -0500

Some more cleanup


Diffstat:
area.c | 6+++---
client.c | 16+++++++---------
fs.c | 10+++++-----
wmii.h | 1-
4 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/area.c b/area.c @@ -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); diff --git a/client.c b/client.c @@ -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; } diff --git a/fs.c b/fs.c @@ -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)) diff --git a/wmii.h b/wmii.h @@ -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);