aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-04-20 17:29:16 +0200
committerFurkan Sahin <furkan-dev@proton.me>2021-04-20 17:29:16 +0200
commit2e00eb79dbe7279d9ca64d54bc0f441cc542799d (patch)
treeee47e945748a517497342b6d35b7e31f93a6966d
parent56938475f19437568c6141526e6a24ece457dac7 (diff)
Avoid creating zero-sized textures for marks
Same as 6327f1b36196 ("Avoid creating zero-sized textures for titlebars") but for marks. (cherry picked from commit e3e99d961dc445258c08ec47b22ec83af38197f6)
-rw-r--r--sway/tree/container.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index e36b915e..8ca6a50d 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -1624,6 +1624,10 @@ static void update_marks_texture(struct sway_container *con,
"%s", buffer);
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);