X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=lib%2Fswm_hack.c;h=e6df1b080af3747f20f174789ee459bb482350dd;hb=59e91c45a7dd7ca913323f8391d8bce0d9f0769d;hp=34550d81a8215001aed91db57a2c977402a679d2;hpb=8d74b4359e4bb6a3891f30f27cbb47b47e8a6ccb;p=spectrwm.git diff --git a/lib/swm_hack.c b/lib/swm_hack.c index 34550d8..e6df1b0 100644 --- a/lib/swm_hack.c +++ b/lib/swm_hack.c @@ -1,4 +1,3 @@ -/* $scrotwm$ */ /* * Copyright (c) 2009 Marco Peereboom * Copyright (c) 2009 Ryan McBride @@ -91,9 +90,8 @@ set_property(Display *dpy, Window id, char *name, char *val) { Atom atom = 0; char prop[SWM_PROPLEN]; - - static XIA *xia = NULL; - static XCP *xcp = NULL; + static XIA *xia = NULL; + static XCP *xcp = NULL; /* find the real Xlib and the real X function */ if (!lib_xlib) @@ -105,10 +103,11 @@ set_property(Display *dpy, Window id, char *name, char *val) /* Try to update the window's workspace property */ atom = (*xia)(dpy, name, False); - if (atom) + if (atom) if (snprintf(prop, SWM_PROPLEN, "%s", val) < SWM_PROPLEN) (*xcp)(dpy, id, atom, XA_STRING, - 8, PropModeReplace, prop, SWM_PROPLEN); + 8, PropModeReplace, (unsigned char *)prop, + strlen((char *)prop)); } typedef Window(CWF) (Display * _display, Window _parent, int _x,