From c5dc3d49aa42220bfef156fb9d559c677dfd7381 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Fri, 17 Sep 2010 01:51:10 +0200 Subject: [PATCH] We don't need to crop at that point --- i3bar/src/xcb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 88f4be35..43ac8beb 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -124,16 +124,13 @@ uint32_t get_colorpixel(const char *s) { */ void refresh_statusline() { int glyph_count; - uint32_t root_width = xcb_screens->width_in_pixels; + if (statusline == NULL) { return; } xcb_char2b_t *text = (xcb_char2b_t*) convert_utf8_to_ucs2(statusline, &glyph_count); statusline_width = predict_text_extents(text, glyph_count); - int crop_x = MIN(0, ((int32_t)root_width) - ((int32_t)statusline_width)); - printf("Cropping statusline with %d glyphs at x=%d\n", glyph_count, crop_x); - statusline_width = MIN((int32_t)statusline_width, (int32_t)root_width); xcb_free_pixmap(xcb_connection, statusline_pm); statusline_pm = xcb_generate_id(xcb_connection); -- 2.39.5