diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-02-19 13:53:40 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-19 13:53:40 +0100 |
| commit | b3d7e07f18f0f69f8c3b3542615da62dfc4c6175 (patch) | |
| tree | 55ef91ea3249738001b2f60aa80fb8d68af32862 /client.c | |
| parent | added some new convenience functions (diff) | |
| download | dwm-b3d7e07f18f0f69f8c3b3542615da62dfc4c6175.tar.gz dwm-b3d7e07f18f0f69f8c3b3542615da62dfc4c6175.zip | |
some more refactoring
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 42 |
1 files changed, 0 insertions, 42 deletions
| @@ -61,20 +61,6 @@ xerrordummy(Display *dsply, XErrorEvent *ee) { | |||
| 61 | /* extern */ | 61 | /* extern */ |
| 62 | 62 | ||
| 63 | void | 63 | void |
| 64 | attach(Client *c) { | ||
| 65 | if(clients) | ||
| 66 | clients->prev = c; | ||
| 67 | c->next = clients; | ||
| 68 | clients = c; | ||
| 69 | } | ||
| 70 | |||
| 71 | void | ||
| 72 | attachstack(Client *c) { | ||
| 73 | c->snext = stack; | ||
| 74 | stack = c; | ||
| 75 | } | ||
| 76 | |||
| 77 | void | ||
| 78 | configure(Client *c) { | 64 | configure(Client *c) { |
| 79 | XConfigureEvent ce; | 65 | XConfigureEvent ce; |
| 80 | 66 | ||
| @@ -93,24 +79,6 @@ configure(Client *c) { | |||
| 93 | } | 79 | } |
| 94 | 80 | ||
| 95 | void | 81 | void |
| 96 | detach(Client *c) { | ||
| 97 | if(c->prev) | ||
| 98 | c->prev->next = c->next; | ||
| 99 | if(c->next) | ||
| 100 | c->next->prev = c->prev; | ||
| 101 | if(c == clients) | ||
| 102 | clients = c->next; | ||
| 103 | c->next = c->prev = NULL; | ||
| 104 | } | ||
| 105 | |||
| 106 | void | ||
| 107 | detachstack(Client *c) { | ||
| 108 | Client **tc; | ||
| 109 | for(tc=&stack; *tc && *tc != c; tc=&(*tc)->snext); | ||
| 110 | *tc = c->snext; | ||
| 111 | } | ||
| 112 | |||
| 113 | void | ||
| 114 | focus(Client *c) { | 82 | focus(Client *c) { |
| 115 | if(c && !isvisible(c)) | 83 | if(c && !isvisible(c)) |
| 116 | return; | 84 | return; |
| @@ -135,16 +103,6 @@ focus(Client *c) { | |||
| 135 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | 103 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); |
| 136 | } | 104 | } |
| 137 | 105 | ||
| 138 | Client * | ||
| 139 | getclient(Window w) { | ||
| 140 | Client *c; | ||
| 141 | |||
| 142 | for(c = clients; c; c = c->next) | ||
| 143 | if(c->win == w) | ||
| 144 | return c; | ||
| 145 | return NULL; | ||
| 146 | } | ||
| 147 | |||
| 148 | Bool | 106 | Bool |
| 149 | isprotodel(Client *c) { | 107 | isprotodel(Client *c) { |
| 150 | int i, n; | 108 | int i, n; |
