comparison draw.c @ 690:399f08187c27

removed drawclient and drawall (they performed useless operations/consumed useless cpu cycles)
author Anselm R. Garbe <arg@suckless.org>
date Mon, 15 Jan 2007 12:04:25 +0100
parents cbec08a54a15
children 4d12382fef8e
comparison
equal deleted inserted replaced
689:cbec08a54a15 690:399f08187c27
96 } 96 }
97 97
98 /* extern */ 98 /* extern */
99 99
100 void 100 void
101 drawall(void) {
102 Client *c;
103
104 for(c = clients; c; c = getnext(c->next))
105 drawclient(c);
106 drawstatus();
107 }
108
109 void
110 drawstatus(void) { 101 drawstatus(void) {
111 int i, x; 102 int i, x;
112 103
113 dc.x = dc.y = 0; 104 dc.x = dc.y = 0;
114 for(i = 0; i < ntags; i++) { 105 for(i = 0; i < ntags; i++) {
132 if((dc.w = dc.x - x) > bh) { 123 if((dc.w = dc.x - x) > bh) {
133 dc.x = x; 124 dc.x = x;
134 drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm, False, False); 125 drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm, False, False);
135 } 126 }
136 XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); 127 XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
137 XSync(dpy, False);
138 }
139
140 void
141 drawclient(Client *c) {
142 if(c == sel && issel) {
143 drawstatus();
144 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
145 return;
146 }
147 XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]);
148 XSync(dpy, False); 128 XSync(dpy, False);
149 } 129 }
150 130
151 unsigned long 131 unsigned long
152 getcolor(const char *colstr) { 132 getcolor(const char *colstr) {