mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 23:47:21 +01:00
Avoid creating zero-sized textures for titlebars
Creating a zero-sized wlr_texture is incorrect.
This commit is contained in:
parent
730efbc89c
commit
6327f1b361
1 changed files with 4 additions and 0 deletions
|
@ -531,6 +531,10 @@ static void update_title_texture(struct sway_container *con,
|
|||
cairo_surface_destroy(dummy_surface);
|
||||
cairo_destroy(c);
|
||||
|
||||
if (width == 0 || height == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
cairo_surface_t *surface = cairo_image_surface_create(
|
||||
CAIRO_FORMAT_ARGB32, width, height);
|
||||
cairo_t *cairo = cairo_create(surface);
|
||||
|
|
Loading…
Reference in a new issue