diff --git a/common/draw.c b/common/draw.c index 76e72ccce..3fc4b766b 100644 --- a/common/draw.c +++ b/common/draw.c @@ -753,7 +753,7 @@ draw_rotate(DrawCtx *ctx, Drawable dest, int dest_w, int dest_h, * \return text width */ unsigned short -draw_textwidth(Display *disp, font_t *font, char *text) +draw_textwidth(Display *disp, font_t *font, const char *text) { cairo_surface_t *surface; cairo_t *cr; diff --git a/common/draw.h b/common/draw.h index 63b902825..969b3933c 100644 --- a/common/draw.h +++ b/common/draw.h @@ -135,7 +135,7 @@ void draw_image(DrawCtx *, int, int, int, const char *); void draw_image_from_argb_data(DrawCtx *, int, int, int, int, int, unsigned char *); area_t draw_get_image_size(const char *filename); void draw_rotate(DrawCtx *, Drawable, int, int, double, int, int); -unsigned short draw_textwidth(Display *, font_t *, char *); +unsigned short draw_textwidth(Display *, font_t *, const char *); Alignment draw_align_get_from_str(const char *); Bool draw_color_new(Display *, int, const char *, XColor *); void draw_style_init(Display *, int, cfg_t *, style_t *, style_t *);