summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/main.c b/main.c
index 6f60c9b..6da3ccd 100644
--- a/main.c
+++ b/main.c
@@ -92,19 +92,18 @@ Window root, barwin;
92int 92int
93getproto(Window w) 93getproto(Window w)
94{ 94{
95 int status, format, protos = 0; 95 int i, format, protos, status;
96 int i;
97 unsigned long extra, res; 96 unsigned long extra, res;
98 Atom *protocols, real; 97 Atom *protocols, real;
99 98
100 status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, 99 protos = 0;
101 False, XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols); 100 status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False,
101 XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols);
102 if(status != Success || protocols == 0) 102 if(status != Success || protocols == 0)
103 return protos; 103 return protos;
104 for(i = 0; i < res; i++) { 104 for(i = 0; i < res; i++)
105 if(protocols[i] == wmatom[WMDelete]) 105 if(protocols[i] == wmatom[WMDelete])
106 protos |= PROTODELWIN; 106 protos |= PROTODELWIN;
107 }
108 free(protocols); 107 free(protocols);
109 return protos; 108 return protos;
110} 109}