/* Client Handling
*****************************************************************************/
+void client_add(XConf* x, Client* c) {
+}
+
+void client_del(XConf* x, Client* c) {
+ /* first remove it from the list */
+ if (c->prev) c->prev->next = c->next;
+ if (c->next) c->next->prev = c->prev;
+ if (Clients == c) Clients = c->next;
+}
+
void client_config(XConf* xs, Client* c, int x, int y, int w, int h) {
c->x = x, c->y = y, c->w = w, c->h = h;
int height = xs->font->height + 3;
XMapRaised(x->display, c->win);
}
-void client_add(XConf* x, Window win) {
+void client_create(XConf* x, Window win) {
Client* c = calloc(1, sizeof(Client));
c->win = win;
XGrabServer(x->display);
}
-void client_del(XConf* x, Client* c) {
- /* first remove it from the list */
- if (c->prev) c->prev->next = c->next;
- if (c->next) c->next->prev = c->prev;
- if (Clients == c) Clients = c->next;
-
- /* clean it up now */
+void client_destroy(XConf* x, Client* c) {
+ client_del(x, c);
XGrabServer(x->display);
XftDrawDestroy(c->xft);
XDestroyWindow(x->display, c->frame);
if (XGetWindowAttributes(x->display, e->xmaprequest.window, &attr)) {
if (attr.override_redirect) return; /* ignore certain windows (like frames) */
if (!client_find(e->xmaprequest.window))
- client_add(x, e->xmaprequest.window);
+ client_create(x, e->xmaprequest.window);
}
}
client_config(x, c->next, c->next->x, c->next->y, c->next->w, c->next->h);
client_raise(x, c->next);
}
- client_del(x, c);
+ client_destroy(x, c);
}
}