summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-07 12:37:06 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-07 12:37:06 +0100
commit28ffff801bb0137ec3fe4093afc4fb29784b17ec (patch)
tree2072e2465fb0b3cbf4f3241a096de99752e79be1 /main.c
parentyet another fix (diff)
downloaddwm-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.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/main.c b/main.c
index 97fdbaf..da95d95 100644
--- a/main.c
+++ b/main.c
@@ -172,24 +172,6 @@ xerrorstart(Display *dsply, XErrorEvent *ee) {
172 172
173/* extern */ 173/* extern */
174 174
175int
176getproto(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
193void 175void
194sendevent(Window w, Atom a, long value) { 176sendevent(Window w, Atom a, long value) {
195 XEvent e; 177 XEvent e;