- int protos = 0;
- int i;
- long res;
- unsigned char *protocols;
-
- res = win_property(w, wmatom[WMProtocols], XA_ATOM, 20L, &protocols);
- if(res <= 0) {
+ int i, format, protos, status;
+ unsigned long extra, res;
+ Atom *protocols, real;
+
+ protos = 0;
+ status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False,
+ XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols);
+ if(status != Success || protocols == 0)