]> code.delx.au - spectrwm/blobdiff - lib/swm_hack.c
Fix parse_rgb() 8-bit to 16-bit color conversion
[spectrwm] / lib / swm_hack.c
index 52f2a5cc0625806ca0b15e0eae1a41432201b645..c992689057b20d38ff1edcecc203f704cf5fe369 100644 (file)
@@ -1,4 +1,3 @@
-/* $scrotwm$ */
 /*
  * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
  * Copyright (c) 2009 Ryan McBride <mcbride@countersiege.com>
@@ -107,7 +106,8 @@ set_property(Display *dpy, Window id, char *name, char *val)
        if (atom)
                if (snprintf(prop, SWM_PROPLEN, "%s", val) < SWM_PROPLEN)
                        (*xcp)(dpy, id, atom, XA_STRING,
-                           8, PropModeReplace, (unsigned char *)prop, SWM_PROPLEN);
+                           8, PropModeReplace, (unsigned char *)prop,
+                           strlen((char *)prop));
 }
 
 typedef             Window(CWF) (Display * _display, Window _parent, int _x,
@@ -234,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)