diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-14 22:54:09 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-14 22:54:09 +0200 |
| commit | c0705eeb65733e8c5091e47d5bdc701a0779a949 (patch) | |
| tree | 0a33e58c24419ff6e12f5401e3bfd65c1e90dfa3 | |
| parent | rearranged (diff) | |
| download | dwm-c0705eeb65733e8c5091e47d5bdc701a0779a949.tar.gz dwm-c0705eeb65733e8c5091e47d5bdc701a0779a949.zip | |
sanitized names
| -rw-r--r-- | client.c | 28 | ||||
| -rw-r--r-- | draw.c | 10 | ||||
| -rw-r--r-- | dwm.h | 24 | ||||
| -rw-r--r-- | event.c | 14 | ||||
| -rw-r--r-- | key.c | 16 | ||||
| -rw-r--r-- | main.c | 28 | ||||
| -rw-r--r-- | screen.c | 24 |
7 files changed, 72 insertions, 72 deletions
| @@ -17,14 +17,14 @@ static Rule rule[] = { | |||
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | Client * | 19 | Client * |
| 20 | next(Client *c) | 20 | getnext(Client *c) |
| 21 | { | 21 | { |
| 22 | for(; c && !c->tags[tsel]; c = c->next); | 22 | for(; c && !c->tags[tsel]; c = c->next); |
| 23 | return c; | 23 | return c; |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | void | 26 | void |
| 27 | ban_client(Client *c) | 27 | ban(Client *c) |
| 28 | { | 28 | { |
| 29 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); | 29 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
| 30 | XMoveWindow(dpy, c->title, c->tx + 2 * sw, c->ty); | 30 | XMoveWindow(dpy, c->title, c->tx + 2 * sw, c->ty); |
| @@ -48,7 +48,7 @@ resize_title(Client *c) | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | void | 50 | void |
| 51 | update_name(Client *c) | 51 | settitle(Client *c) |
| 52 | { | 52 | { |
| 53 | XTextProperty name; | 53 | XTextProperty name; |
| 54 | int n; | 54 | int n; |
| @@ -76,7 +76,7 @@ update_name(Client *c) | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | void | 78 | void |
| 79 | update_size(Client *c) | 79 | setsize(Client *c) |
| 80 | { | 80 | { |
| 81 | XSizeHints size; | 81 | XSizeHints size; |
| 82 | long msize; | 82 | long msize; |
| @@ -114,7 +114,7 @@ update_size(Client *c) | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | void | 116 | void |
| 117 | craise(Client *c) | 117 | higher(Client *c) |
| 118 | { | 118 | { |
| 119 | XRaiseWindow(dpy, c->win); | 119 | XRaiseWindow(dpy, c->win); |
| 120 | XRaiseWindow(dpy, c->title); | 120 | XRaiseWindow(dpy, c->title); |
| @@ -136,8 +136,8 @@ focus(Client *c) | |||
| 136 | XFlush(dpy); | 136 | XFlush(dpy); |
| 137 | sel = c; | 137 | sel = c; |
| 138 | if(old && old != c) | 138 | if(old && old != c) |
| 139 | draw_client(old); | 139 | drawtitle(old); |
| 140 | draw_client(c); | 140 | drawtitle(c); |
| 141 | XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); | 141 | XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); |
| 142 | XFlush(dpy); | 142 | XFlush(dpy); |
| 143 | while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | 143 | while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); |
| @@ -196,8 +196,8 @@ manage(Window w, XWindowAttributes *wa) | |||
| 196 | c->h = wa->height; | 196 | c->h = wa->height; |
| 197 | c->th = bh; | 197 | c->th = bh; |
| 198 | c->border = 1; | 198 | c->border = 1; |
| 199 | c->proto = win_proto(c->win); | 199 | c->proto = proto(c->win); |
| 200 | update_size(c); | 200 | setsize(c); |
| 201 | XSelectInput(dpy, c->win, | 201 | XSelectInput(dpy, c->win, |
| 202 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); | 202 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); |
| 203 | XGetTransientForHint(dpy, c->win, &trans); | 203 | XGetTransientForHint(dpy, c->win, &trans); |
| @@ -210,7 +210,7 @@ manage(Window w, XWindowAttributes *wa) | |||
| 210 | DefaultVisual(dpy, screen), | 210 | DefaultVisual(dpy, screen), |
| 211 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); | 211 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); |
| 212 | 212 | ||
| 213 | update_name(c); | 213 | settitle(c); |
| 214 | init_tags(c); | 214 | init_tags(c); |
| 215 | 215 | ||
| 216 | for(l = &clients; *l; l = &(*l)->next); | 216 | for(l = &clients; *l; l = &(*l)->next); |
| @@ -236,7 +236,7 @@ manage(Window w, XWindowAttributes *wa) | |||
| 236 | focus(c); | 236 | focus(c); |
| 237 | } | 237 | } |
| 238 | else { | 238 | else { |
| 239 | ban_client(c); | 239 | ban(c); |
| 240 | XMapRaised(dpy, c->win); | 240 | XMapRaised(dpy, c->win); |
| 241 | XMapRaised(dpy, c->title); | 241 | XMapRaised(dpy, c->title); |
| 242 | } | 242 | } |
| @@ -339,7 +339,7 @@ resize(Client *c, Bool inc) | |||
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | static int | 341 | static int |
| 342 | dummy_error_handler(Display *dsply, XErrorEvent *err) | 342 | dummy_xerror(Display *dsply, XErrorEvent *err) |
| 343 | { | 343 | { |
| 344 | return 0; | 344 | return 0; |
| 345 | } | 345 | } |
| @@ -350,7 +350,7 @@ unmanage(Client *c) | |||
| 350 | Client **l; | 350 | Client **l; |
| 351 | 351 | ||
| 352 | XGrabServer(dpy); | 352 | XGrabServer(dpy); |
| 353 | XSetErrorHandler(dummy_error_handler); | 353 | XSetErrorHandler(dummy_xerror); |
| 354 | 354 | ||
| 355 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); | 355 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); |
| 356 | XDestroyWindow(dpy, c->title); | 356 | XDestroyWindow(dpy, c->title); |
| @@ -366,7 +366,7 @@ unmanage(Client *c) | |||
| 366 | free(c); | 366 | free(c); |
| 367 | 367 | ||
| 368 | XFlush(dpy); | 368 | XFlush(dpy); |
| 369 | XSetErrorHandler(error_handler); | 369 | XSetErrorHandler(xerror); |
| 370 | XUngrabServer(dpy); | 370 | XUngrabServer(dpy); |
| 371 | arrange(NULL); | 371 | arrange(NULL); |
| 372 | if(sel) | 372 | if(sel) |
| @@ -11,7 +11,7 @@ | |||
| 11 | #include "dwm.h" | 11 | #include "dwm.h" |
| 12 | 12 | ||
| 13 | void | 13 | void |
| 14 | draw_bar() | 14 | drawstatus() |
| 15 | { | 15 | { |
| 16 | int i; | 16 | int i; |
| 17 | 17 | ||
| @@ -44,11 +44,11 @@ draw_bar() | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void | 46 | void |
| 47 | draw_client(Client *c) | 47 | drawtitle(Client *c) |
| 48 | { | 48 | { |
| 49 | int i; | 49 | int i; |
| 50 | if(c == sel) { | 50 | if(c == sel) { |
| 51 | draw_bar(); | 51 | drawstatus(); |
| 52 | XUnmapWindow(dpy, c->title); | 52 | XUnmapWindow(dpy, c->title); |
| 53 | XSetWindowBorder(dpy, c->win, dc.fg); | 53 | XSetWindowBorder(dpy, c->win, dc.fg); |
| 54 | return; | 54 | return; |
| @@ -145,7 +145,7 @@ drawtext(const char *text, Bool invert, Bool border) | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | unsigned long | 147 | unsigned long |
| 148 | initcolor(const char *colstr) | 148 | getcolor(const char *colstr) |
| 149 | { | 149 | { |
| 150 | XColor color; | 150 | XColor color; |
| 151 | Colormap cmap = DefaultColormap(dpy, screen); | 151 | Colormap cmap = DefaultColormap(dpy, screen); |
| @@ -172,7 +172,7 @@ textw(char *text) | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | void | 174 | void |
| 175 | initfont(const char *fontstr) | 175 | setfont(const char *fontstr) |
| 176 | { | 176 | { |
| 177 | char **missing, *def; | 177 | char **missing, *def; |
| 178 | int i, n; | 178 | int i, n; |
| @@ -107,22 +107,22 @@ extern void manage(Window w, XWindowAttributes *wa); | |||
| 107 | extern void unmanage(Client *c); | 107 | extern void unmanage(Client *c); |
| 108 | extern Client *getclient(Window w); | 108 | extern Client *getclient(Window w); |
| 109 | extern void focus(Client *c); | 109 | extern void focus(Client *c); |
| 110 | extern void update_name(Client *c); | 110 | extern void settitle(Client *c); |
| 111 | extern void resize(Client *c, Bool inc); | 111 | extern void resize(Client *c, Bool inc); |
| 112 | extern void update_size(Client *c); | 112 | extern void setsize(Client *c); |
| 113 | extern Client *gettitle(Window w); | 113 | extern Client *gettitle(Window w); |
| 114 | extern void craise(Client *c); | 114 | extern void higher(Client *c); |
| 115 | extern void lower(Client *c); | 115 | extern void lower(Client *c); |
| 116 | extern void gravitate(Client *c, Bool invert); | 116 | extern void gravitate(Client *c, Bool invert); |
| 117 | extern void ban_client(Client *c); | 117 | extern void ban(Client *c); |
| 118 | extern Client *next(Client *c); | 118 | extern Client *getnext(Client *c); |
| 119 | 119 | ||
| 120 | /* draw.c */ | 120 | /* draw.c */ |
| 121 | extern void draw_bar(); | 121 | extern void drawstatus(); |
| 122 | extern void draw_client(Client *c); | 122 | extern void drawtitle(Client *c); |
| 123 | extern void drawtext(const char *text, Bool invert, Bool border); | 123 | extern void drawtext(const char *text, Bool invert, Bool border); |
| 124 | extern unsigned long initcolor(const char *colstr); | 124 | extern unsigned long getcolor(const char *colstr); |
| 125 | extern void initfont(const char *fontstr); | 125 | extern void setfont(const char *fontstr); |
| 126 | extern unsigned int textnw(char *text, unsigned int len); | 126 | extern unsigned int textnw(char *text, unsigned int len); |
| 127 | extern unsigned int textw(char *text); | 127 | extern unsigned int textw(char *text); |
| 128 | extern unsigned int texth(void); | 128 | extern unsigned int texth(void); |
| @@ -132,9 +132,9 @@ extern void grabkeys(); | |||
| 132 | extern void keypress(XEvent *e); | 132 | extern void keypress(XEvent *e); |
| 133 | 133 | ||
| 134 | /* main.c */ | 134 | /* main.c */ |
| 135 | extern int error_handler(Display *dsply, XErrorEvent *e); | 135 | extern int xerror(Display *dsply, XErrorEvent *e); |
| 136 | extern void send_message(Window w, Atom a, long value); | 136 | extern void sendevent(Window w, Atom a, long value); |
| 137 | extern int win_proto(Window w); | 137 | extern int proto(Window w); |
| 138 | extern void quit(Arg *arg); | 138 | extern void quit(Arg *arg); |
| 139 | 139 | ||
| 140 | /* screen.c */ | 140 | /* screen.c */ |
| @@ -129,7 +129,7 @@ buttonpress(XEvent *e) | |||
| 129 | else if((c = getclient(ev->window))) { | 129 | else if((c = getclient(ev->window))) { |
| 130 | if(arrange == tiling && !c->floating) | 130 | if(arrange == tiling && !c->floating) |
| 131 | return; | 131 | return; |
| 132 | craise(c); | 132 | higher(c); |
| 133 | switch(ev->button) { | 133 | switch(ev->button) { |
| 134 | default: | 134 | default: |
| 135 | break; | 135 | break; |
| @@ -225,9 +225,9 @@ expose(XEvent *e) | |||
| 225 | 225 | ||
| 226 | if(ev->count == 0) { | 226 | if(ev->count == 0) { |
| 227 | if(barwin == ev->window) | 227 | if(barwin == ev->window) |
| 228 | draw_bar(); | 228 | drawstatus(); |
| 229 | else if((c = gettitle(ev->window))) | 229 | else if((c = gettitle(ev->window))) |
| 230 | draw_client(c); | 230 | drawtitle(c); |
| 231 | } | 231 | } |
| 232 | } | 232 | } |
| 233 | 233 | ||
| @@ -262,7 +262,7 @@ propertynotify(XEvent *e) | |||
| 262 | 262 | ||
| 263 | if((c = getclient(ev->window))) { | 263 | if((c = getclient(ev->window))) { |
| 264 | if(ev->atom == wm_atom[WMProtocols]) { | 264 | if(ev->atom == wm_atom[WMProtocols]) { |
| 265 | c->proto = win_proto(c->win); | 265 | c->proto = proto(c->win); |
| 266 | return; | 266 | return; |
| 267 | } | 267 | } |
| 268 | switch (ev->atom) { | 268 | switch (ev->atom) { |
| @@ -273,12 +273,12 @@ propertynotify(XEvent *e) | |||
| 273 | arrange(NULL); | 273 | arrange(NULL); |
| 274 | break; | 274 | break; |
| 275 | case XA_WM_NORMAL_HINTS: | 275 | case XA_WM_NORMAL_HINTS: |
| 276 | update_size(c); | 276 | setsize(c); |
| 277 | break; | 277 | break; |
| 278 | } | 278 | } |
| 279 | if(ev->atom == XA_WM_NAME || ev->atom == net_atom[NetWMName]) { | 279 | if(ev->atom == XA_WM_NAME || ev->atom == net_atom[NetWMName]) { |
| 280 | update_name(c); | 280 | settitle(c); |
| 281 | draw_client(c); | 281 | drawtitle(c); |
| 282 | } | 282 | } |
| 283 | } | 283 | } |
| 284 | } | 284 | } |
| @@ -99,8 +99,8 @@ zoom(Arg *arg) | |||
| 99 | if(!sel) | 99 | if(!sel) |
| 100 | return; | 100 | return; |
| 101 | 101 | ||
| 102 | if(sel == next(clients) && sel->next) { | 102 | if(sel == getnext(clients) && sel->next) { |
| 103 | if((c = next(sel->next))) | 103 | if((c = getnext(sel->next))) |
| 104 | sel = c; | 104 | sel = c; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| @@ -122,7 +122,7 @@ max(Arg *arg) | |||
| 122 | sel->y = sy + bh; | 122 | sel->y = sy + bh; |
| 123 | sel->w = sw - 2 * sel->border; | 123 | sel->w = sw - 2 * sel->border; |
| 124 | sel->h = sh - 2 * sel->border - bh; | 124 | sel->h = sh - 2 * sel->border - bh; |
| 125 | craise(sel); | 125 | higher(sel); |
| 126 | resize(sel, False); | 126 | resize(sel, False); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| @@ -157,7 +157,7 @@ prevc(Arg *arg) | |||
| 157 | return; | 157 | return; |
| 158 | 158 | ||
| 159 | if((c = sel->revert && sel->revert->tags[tsel] ? sel->revert : NULL)) { | 159 | if((c = sel->revert && sel->revert->tags[tsel] ? sel->revert : NULL)) { |
| 160 | craise(c); | 160 | higher(c); |
| 161 | focus(c); | 161 | focus(c); |
| 162 | } | 162 | } |
| 163 | } | 163 | } |
| @@ -170,10 +170,10 @@ nextc(Arg *arg) | |||
| 170 | if(!sel) | 170 | if(!sel) |
| 171 | return; | 171 | return; |
| 172 | 172 | ||
| 173 | if(!(c = next(sel->next))) | 173 | if(!(c = getnext(sel->next))) |
| 174 | c = next(clients); | 174 | c = getnext(clients); |
| 175 | if(c) { | 175 | if(c) { |
| 176 | craise(c); | 176 | higher(c); |
| 177 | c->revert = sel; | 177 | c->revert = sel; |
| 178 | focus(c); | 178 | focus(c); |
| 179 | } | 179 | } |
| @@ -185,7 +185,7 @@ ckill(Arg *arg) | |||
| 185 | if(!sel) | 185 | if(!sel) |
| 186 | return; | 186 | return; |
| 187 | if(sel->proto & WM_PROTOCOL_DELWIN) | 187 | if(sel->proto & WM_PROTOCOL_DELWIN) |
| 188 | send_message(sel->win, wm_atom[WMProtocols], wm_atom[WMDelete]); | 188 | sendevent(sel->win, wm_atom[WMProtocols], wm_atom[WMDelete]); |
| 189 | else | 189 | else |
| 190 | XKillClient(dpy, sel->win); | 190 | XKillClient(dpy, sel->win); |
| 191 | } | 191 | } |
| @@ -46,7 +46,7 @@ Client *sel = NULL; | |||
| 46 | static Bool other_wm_running; | 46 | static Bool other_wm_running; |
| 47 | static const char version[] = | 47 | static const char version[] = |
| 48 | "dwm-" VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; | 48 | "dwm-" VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; |
| 49 | static int (*x_error_handler) (Display *, XErrorEvent *); | 49 | static int (*x_xerror) (Display *, XErrorEvent *); |
| 50 | 50 | ||
| 51 | static void | 51 | static void |
| 52 | usage() { error("usage: dwm [-v]\n"); } | 52 | usage() { error("usage: dwm [-v]\n"); } |
| @@ -94,7 +94,7 @@ win_property(Window w, Atom a, Atom t, long l, unsigned char **prop) | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | int | 96 | int |
| 97 | win_proto(Window w) | 97 | proto(Window w) |
| 98 | { | 98 | { |
| 99 | unsigned char *protocols; | 99 | unsigned char *protocols; |
| 100 | long res; | 100 | long res; |
| @@ -114,7 +114,7 @@ win_proto(Window w) | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | void | 116 | void |
| 117 | send_message(Window w, Atom a, long value) | 117 | sendevent(Window w, Atom a, long value) |
| 118 | { | 118 | { |
| 119 | XEvent e; | 119 | XEvent e; |
| 120 | 120 | ||
| @@ -135,7 +135,7 @@ send_message(Window w, Atom a, long value) | |||
| 135 | * calls exit(). | 135 | * calls exit(). |
| 136 | */ | 136 | */ |
| 137 | int | 137 | int |
| 138 | error_handler(Display *dpy, XErrorEvent *error) | 138 | xerror(Display *dpy, XErrorEvent *error) |
| 139 | { | 139 | { |
| 140 | if(error->error_code == BadWindow | 140 | if(error->error_code == BadWindow |
| 141 | || (error->request_code == X_SetInputFocus | 141 | || (error->request_code == X_SetInputFocus |
| @@ -153,7 +153,7 @@ error_handler(Display *dpy, XErrorEvent *error) | |||
| 153 | return 0; | 153 | return 0; |
| 154 | fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", | 154 | fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", |
| 155 | error->request_code, error->error_code); | 155 | error->request_code, error->error_code); |
| 156 | return x_error_handler(dpy, error); /* may call exit() */ | 156 | return x_xerror(dpy, error); /* may call exit() */ |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | /* | 159 | /* |
| @@ -161,7 +161,7 @@ error_handler(Display *dpy, XErrorEvent *error) | |||
| 161 | * is already running. | 161 | * is already running. |
| 162 | */ | 162 | */ |
| 163 | static int | 163 | static int |
| 164 | startup_error_handler(Display *dpy, XErrorEvent *error) | 164 | startup_xerror(Display *dpy, XErrorEvent *error) |
| 165 | { | 165 | { |
| 166 | other_wm_running = True; | 166 | other_wm_running = True; |
| 167 | return -1; | 167 | return -1; |
| @@ -215,7 +215,7 @@ main(int argc, char *argv[]) | |||
| 215 | 215 | ||
| 216 | /* check if another WM is already running */ | 216 | /* check if another WM is already running */ |
| 217 | other_wm_running = False; | 217 | other_wm_running = False; |
| 218 | XSetErrorHandler(startup_error_handler); | 218 | XSetErrorHandler(startup_xerror); |
| 219 | /* this causes an error if some other WM is running */ | 219 | /* this causes an error if some other WM is running */ |
| 220 | XSelectInput(dpy, root, SubstructureRedirectMask); | 220 | XSelectInput(dpy, root, SubstructureRedirectMask); |
| 221 | XFlush(dpy); | 221 | XFlush(dpy); |
| @@ -224,7 +224,7 @@ main(int argc, char *argv[]) | |||
| 224 | error("dwm: another window manager is already running\n"); | 224 | error("dwm: another window manager is already running\n"); |
| 225 | 225 | ||
| 226 | XSetErrorHandler(0); | 226 | XSetErrorHandler(0); |
| 227 | x_error_handler = XSetErrorHandler(error_handler); | 227 | x_xerror = XSetErrorHandler(xerror); |
| 228 | 228 | ||
| 229 | /* init atoms */ | 229 | /* init atoms */ |
| 230 | wm_atom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); | 230 | wm_atom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); |
| @@ -242,10 +242,10 @@ main(int argc, char *argv[]) | |||
| 242 | grabkeys(); | 242 | grabkeys(); |
| 243 | 243 | ||
| 244 | /* style */ | 244 | /* style */ |
| 245 | dc.bg = initcolor(BGCOLOR); | 245 | dc.bg = getcolor(BGCOLOR); |
| 246 | dc.fg = initcolor(FGCOLOR); | 246 | dc.fg = getcolor(FGCOLOR); |
| 247 | dc.border = initcolor(BORDERCOLOR); | 247 | dc.border = getcolor(BORDERCOLOR); |
| 248 | initfont(FONT); | 248 | setfont(FONT); |
| 249 | 249 | ||
| 250 | sx = sy = 0; | 250 | sx = sy = 0; |
| 251 | sw = DisplayWidth(dpy, screen); | 251 | sw = DisplayWidth(dpy, screen); |
| @@ -267,7 +267,7 @@ main(int argc, char *argv[]) | |||
| 267 | 267 | ||
| 268 | dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); | 268 | dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); |
| 269 | dc.gc = XCreateGC(dpy, root, 0, 0); | 269 | dc.gc = XCreateGC(dpy, root, 0, 0); |
| 270 | draw_bar(); | 270 | drawstatus(); |
| 271 | 271 | ||
| 272 | issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); | 272 | issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); |
| 273 | 273 | ||
| @@ -315,7 +315,7 @@ Mainloop: | |||
| 315 | stext[n++] = i; | 315 | stext[n++] = i; |
| 316 | } | 316 | } |
| 317 | stext[n] = 0; | 317 | stext[n] = 0; |
| 318 | draw_bar(); | 318 | drawstatus(); |
| 319 | } | 319 | } |
| 320 | } | 320 | } |
| 321 | } | 321 | } |
| @@ -15,9 +15,9 @@ view(Arg *arg) | |||
| 15 | tsel = arg->i; | 15 | tsel = arg->i; |
| 16 | arrange(NULL); | 16 | arrange(NULL); |
| 17 | 17 | ||
| 18 | for(c = clients; c; c = next(c->next)) | 18 | for(c = clients; c; c = getnext(c->next)) |
| 19 | draw_client(c); | 19 | drawtitle(c); |
| 20 | draw_bar(); | 20 | drawstatus(); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | void | 23 | void |
| @@ -30,15 +30,15 @@ floating(Arg *arg) | |||
| 30 | if(c->tags[tsel]) | 30 | if(c->tags[tsel]) |
| 31 | resize(c, True); | 31 | resize(c, True); |
| 32 | else | 32 | else |
| 33 | ban_client(c); | 33 | ban(c); |
| 34 | } | 34 | } |
| 35 | if(sel && !sel->tags[tsel]) { | 35 | if(sel && !sel->tags[tsel]) { |
| 36 | if((sel = next(clients))) { | 36 | if((sel = getnext(clients))) { |
| 37 | craise(sel); | 37 | higher(sel); |
| 38 | focus(sel); | 38 | focus(sel); |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | draw_bar(); | 41 | drawstatus(); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | void | 44 | void |
| @@ -61,7 +61,7 @@ tiling(Arg *arg) | |||
| 61 | for(i = 0, c = clients; c; c = c->next) { | 61 | for(i = 0, c = clients; c; c = c->next) { |
| 62 | if(c->tags[tsel]) { | 62 | if(c->tags[tsel]) { |
| 63 | if(c->floating) { | 63 | if(c->floating) { |
| 64 | craise(c); | 64 | higher(c); |
| 65 | resize(c, True); | 65 | resize(c, True); |
| 66 | continue; | 66 | continue; |
| 67 | } | 67 | } |
| @@ -87,14 +87,14 @@ tiling(Arg *arg) | |||
| 87 | i++; | 87 | i++; |
| 88 | } | 88 | } |
| 89 | else | 89 | else |
| 90 | ban_client(c); | 90 | ban(c); |
| 91 | } | 91 | } |
| 92 | if(!sel || (sel && !sel->tags[tsel])) { | 92 | if(!sel || (sel && !sel->tags[tsel])) { |
| 93 | if((sel = next(clients))) { | 93 | if((sel = getnext(clients))) { |
| 94 | craise(sel); | 94 | higher(sel); |
| 95 | focus(sel); | 95 | focus(sel); |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | draw_bar(); | 98 | drawstatus(); |
| 99 | } | 99 | } |
| 100 | 100 | ||
