diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-04-20 17:21:05 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-04-20 17:21:05 +0200 |
| commit | 56938475f19437568c6141526e6a24ece457dac7 (patch) | |
| tree | 6ad4bfdea4e92411c75806dd63cf5aeddcd8e577 | |
| parent | 1670b63abca6536d44ccd0a49e2a64eb064f6d0a (diff) | |
Avoid creating zero-sized textures for titlebars
Creating a zero-sized wlr_texture is incorrect.
(cherry picked from commit 6327f1b36196d5b6e22be9c9f839f29d5f23f346)
| -rw-r--r-- | sway/tree/container.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 68fbec2f..e36b915e 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -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); |
