]> 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 f90419eabbc7d0b10466a09c96eec6744868d313..c992689057b20d38ff1edcecc203f704cf5fe369 100644 (file)
@@ -106,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,
@@ -233,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)