- int protos = 0;
- int i;
- long res;
- Atom *protocols;
-
- res = winprop(w, wmatom[WMProtocols], XA_ATOM, 20L,
- ((unsigned char **)&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)