]> code.delx.au - spectrwm/commitdiff
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 e3a068507f45ac621ade76406a7df1d0fc9d2feb..f6e507048af90fdf0415862c9f935ee066b5fbb5 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);
 }