[draw] Remove useless default_screen
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
255d91c711
commit
e80e6a73c5
|
@ -112,7 +112,6 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
xcb_connection_t *connection;
|
xcb_connection_t *connection;
|
||||||
int default_screen;
|
|
||||||
xcb_drawable_t drawable;
|
xcb_drawable_t drawable;
|
||||||
xcb_visualtype_t *visual;
|
xcb_visualtype_t *visual;
|
||||||
int width;
|
int width;
|
||||||
|
|
|
@ -141,7 +141,7 @@ taglist_draw(widget_t *widget,
|
||||||
area = p_new(area_t, 1);
|
area = p_new(area_t, 1);
|
||||||
text[i] = taglist_text_get(tag, data);
|
text[i] = taglist_text_get(tag, data);
|
||||||
text[i] = tag_markup_parse(tag, text[i], a_strlen(text[i]));
|
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]);
|
styles[i]->font, text[i]);
|
||||||
area->x = widget->area.width;
|
area->x = widget->area.width;
|
||||||
area->height = widget->statusbar->height;
|
area->height = widget->statusbar->height;
|
||||||
|
|
|
@ -42,7 +42,7 @@ textbox_draw(widget_t *widget, draw_context_t *ctx, int offset, int used)
|
||||||
else if(widget->alignment == AlignFlex)
|
else if(widget->alignment == AlignFlex)
|
||||||
widget->area.width = widget->statusbar->width - used;
|
widget->area.width = widget->statusbar->width - used;
|
||||||
else
|
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,
|
globalconf.screens[widget->statusbar->screen].styles.normal.font, d->text).width,
|
||||||
widget->statusbar->width - used);
|
widget->statusbar->width - used);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue