From b324240783c83e88aa8212112cd887448dbd14f2 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 12 Feb 2009 20:58:04 +0000 Subject: [PATCH] Beware of stolen code for it was written on little endian and 32 bits. --- scrotwm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index e3a0685..f6e5070 100644 --- 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); } -- 1.7.10.4