diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-05 20:32:31 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-05 20:32:31 +1000 |
commit | e83e5487be4142af290e772199c2870d6140be46 (patch) | |
tree | d88f77c7ca8d54d8a64c3e713a05c6b9d18c59f7 /sway/tree/container.c | |
parent | fbcbbb976c29bb2c4b1bc6aeb6331acd10c70f5f (diff) |
Use scissor to render title texture
This allows the title's texture to always be the full width of the text,
and clipped at render time according to the desired width (eg. tabs...).
As an added bonus, the texture no longer needs to be updated when
containers are arranged.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 3746ad81..9fb47020 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -584,12 +584,6 @@ static void update_title_texture(struct sway_container *con, get_text_size(c, config->font, &width, NULL, scale, false, "%s", con->name); cairo_destroy(c); - int borders = (con->type == C_VIEW ? con->sway_view->border_thickness : - config->border_thickness) * 2 * scale; - if (width > con->width * scale - borders) { - width = con->width * scale - borders; - } - cairo_surface_t *surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height); cairo_t *cairo = cairo_create(surface); |