summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-14 22:54:09 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-14 22:54:09 +0200
commitc0705eeb65733e8c5091e47d5bdc701a0779a949 (patch)
tree0a33e58c24419ff6e12f5401e3bfd65c1e90dfa3 /client.c
parentrearranged (diff)
downloaddwm-c0705eeb65733e8c5091e47d5bdc701a0779a949.tar.gz
dwm-c0705eeb65733e8c5091e47d5bdc701a0779a949.zip
sanitized names
Diffstat (limited to 'client.c')
-rw-r--r--client.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/client.c b/client.c
index 63fb1e5..7bb8459 100644
--- a/client.c
+++ b/client.c
@@ -17,14 +17,14 @@ static Rule rule[] = {
17}; 17};
18 18
19Client * 19Client *
20next(Client *c) 20getnext(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
26void 26void
27ban_client(Client *c) 27ban(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
50void 50void
51update_name(Client *c) 51settitle(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
78void 78void
79update_size(Client *c) 79setsize(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
116void 116void
117craise(Client *c) 117higher(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
341static int 341static int
342dummy_error_handler(Display *dsply, XErrorEvent *err) 342dummy_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)