JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Beware of stolen code for it was written on little endian and 32 bits.
[spectrwm.git] / scrotwm.c
index 985cda1..f6e5070 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -360,6 +360,7 @@ struct quirk {
        { "xine",               "xine Panel",   SWM_Q_FLOAT | SWM_Q_ANYWHERE },
        { "Xitk",               "Xine Window",  SWM_Q_FLOAT | SWM_Q_ANYWHERE },
        { "xine",               "xine Video Fullscreen Window", SWM_Q_FULLSCREEN | SWM_Q_FLOAT },
+       { "pcb",                "pcb",          SWM_Q_FLOAT },
        { NULL,                 NULL,           0},
 };
 
@@ -2626,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);
 }