diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-02-07 12:37:06 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-07 12:37:06 +0100 |
| commit | 28ffff801bb0137ec3fe4093afc4fb29784b17ec (patch) | |
| tree | 2072e2465fb0b3cbf4f3241a096de99752e79be1 /main.c | |
| parent | yet another fix (diff) | |
| download | dwm-28ffff801bb0137ec3fe4093afc4fb29784b17ec.tar.gz dwm-28ffff801bb0137ec3fe4093afc4fb29784b17ec.zip | |
replaced getproto with a saner function, now old-school artifacts of WM times in the early 90s completely disappeared, no punned pointer warning anymore ;)
Diffstat (limited to '')
| -rw-r--r-- | main.c | 18 |
1 files changed, 0 insertions, 18 deletions
| @@ -172,24 +172,6 @@ xerrorstart(Display *dsply, XErrorEvent *ee) { | |||
| 172 | 172 | ||
| 173 | /* extern */ | 173 | /* extern */ |
| 174 | 174 | ||
| 175 | int | ||
| 176 | getproto(Window w) { | ||
| 177 | int i, format, protos, status; | ||
| 178 | unsigned long extra, res; | ||
| 179 | Atom *protocols, real; | ||
| 180 | |||
| 181 | protos = 0; | ||
| 182 | status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False, | ||
| 183 | XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols); | ||
| 184 | if(status != Success || protocols == 0) | ||
| 185 | return protos; | ||
| 186 | for(i = 0; i < res; i++) | ||
| 187 | if(protocols[i] == wmatom[WMDelete]) | ||
| 188 | protos |= PROTODELWIN; | ||
| 189 | free(protocols); | ||
| 190 | return protos; | ||
| 191 | } | ||
| 192 | |||
| 193 | void | 175 | void |
| 194 | sendevent(Window w, Atom a, long value) { | 176 | sendevent(Window w, Atom a, long value) { |
| 195 | XEvent e; | 177 | XEvent e; |
