From e80e6a73c5a8c685ae11724b37c699e7d0f67de0 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 13 May 2008 17:42:05 +0200 Subject: [PATCH] [draw] Remove useless default_screen Signed-off-by: Julien Danjou --- common/draw.h | 1 - widgets/taglist.c | 2 +- widgets/textbox.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/draw.h b/common/draw.h index f4feba761..cdc53eb54 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 a257c8561..d247e996b 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 99d8891ad..b0e7a482c 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);