Avoid creating zero-sized textures for marks
Same as 6327f1b361
("Avoid creating zero-sized textures for titlebars")
but for marks.
This commit is contained in:
parent
3173a4f353
commit
e3e99d961d
|
@ -1623,6 +1623,10 @@ static void update_marks_texture(struct sway_container *con,
|
||||||
"%s", buffer);
|
"%s", buffer);
|
||||||
cairo_destroy(c);
|
cairo_destroy(c);
|
||||||
|
|
||||||
|
if (width == 0 || height == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cairo_surface_t *surface = cairo_image_surface_create(
|
cairo_surface_t *surface = cairo_image_surface_create(
|
||||||
CAIRO_FORMAT_ARGB32, width, height);
|
CAIRO_FORMAT_ARGB32, width, height);
|
||||||
cairo_t *cairo = cairo_create(surface);
|
cairo_t *cairo = cairo_create(surface);
|
||||||
|
|
Loading…
Reference in a new issue