X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=lib%2Fswm_hack.c;h=c992689057b20d38ff1edcecc203f704cf5fe369;hb=1931c8e6d7edc3ce4a7e48cab22ca7cb33396de6;hp=34550d81a8215001aed91db57a2c977402a679d2;hpb=8d74b4359e4bb6a3891f30f27cbb47b47e8a6ccb;p=spectrwm.git diff --git a/lib/swm_hack.c b/lib/swm_hack.c index 34550d8..c992689 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, @@ -235,7 +234,7 @@ void XtAppNextEvent(XtAppContext app_context, XEvent *event_return) { static ANEF *func = NULL; - static int kp_add = 0, kp_subtract = 0; + static KeyCode kp_add = 0, kp_subtract = 0; /* find the real Xlib and the real X function */ if (!lib_xtlib)