aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index a5e1ce9..0a67103 100644
--- a/dwm.c
+++ b/dwm.c
@@ -863,15 +863,15 @@ focusstack(const Arg *arg)
Atom
getatomprop(Client *c, Atom prop)
{
- int di;
+ int format;
unsigned long nitems, dl;
unsigned char *p = NULL;
Atom da, atom = None;
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
- &da, &di, &nitems, &dl, &p) == Success && p) {
- if (nitems > 0)
- atom = *(Atom *)p;
+ &da, &format, &nitems, &dl, &p) == Success && p) {
+ if (nitems > 0 && format == 32)
+ atom = *(long *)p;
XFree(p);
}
return atom;