diff --git a/common/draw.h b/common/draw.h index f4feba76..cdc53eb5 100644 --- a/common/draw.h +++ b/common/draw.h @@ -112,7 +112,6 @@ typedef struct typedef struct { xcb_connection_t *connection; - int default_screen; xcb_drawable_t drawable; xcb_visualtype_t *visual; int width; diff --git a/widgets/taglist.c b/widgets/taglist.c index a257c856..d247e996 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -141,7 +141,7 @@ taglist_draw(widget_t *widget, area = p_new(area_t, 1); text[i] = taglist_text_get(tag, data); text[i] = tag_markup_parse(tag, text[i], a_strlen(text[i])); - *area = draw_text_extents(ctx->connection, ctx->default_screen, + *area = draw_text_extents(ctx->connection, ctx->phys_screen, styles[i]->font, text[i]); area->x = widget->area.width; area->height = widget->statusbar->height; diff --git a/widgets/textbox.c b/widgets/textbox.c index 99d8891a..b0e7a482 100644 --- a/widgets/textbox.c +++ b/widgets/textbox.c @@ -42,7 +42,7 @@ textbox_draw(widget_t *widget, draw_context_t *ctx, int offset, int used) else if(widget->alignment == AlignFlex) widget->area.width = widget->statusbar->width - used; else - widget->area.width = MIN(draw_text_extents(ctx->connection, ctx->default_screen, + widget->area.width = MIN(draw_text_extents(ctx->connection, ctx->phys_screen, globalconf.screens[widget->statusbar->screen].styles.normal.font, d->text).width, widget->statusbar->width - used);