JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Beware of stolen code for it was written on little endian and 32 bits.
authorMarco Peereboom <marco@conformal.com>
Thu, 12 Feb 2009 20:58:04 +0000 (20:58 +0000)
committerMarco Peereboom <marco@conformal.com>
Thu, 12 Feb 2009 20:58:04 +0000 (20:58 +0000)
scrotwm.c

index e3a0685..f6e5070 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -2627,13 +2627,12 @@ getstate(Window w)
        unsigned long           n, extra;
        Atom                    real;
 
-       astate = XInternAtom(display, "WM_STATE", False);
        status = XGetWindowProperty(display, w, astate, 0L, 2L, False, astate,
            &real, &format, &n, &extra, (unsigned char **)&p);
        if (status != Success)
                return (-1);
        if (n != 0)
-               result = *p;
+               result = *((long *)p);
        XFree(p);
        return (result);
 }