Blame SOURCES/gtk-3.22.20-avoid-cellarea-crash.patch

c99098
From 4ba89f25b8a88616afc1915bdb4fb87d13efae6f Mon Sep 17 00:00:00 2001
c99098
From: Benjamin Otte <otte@redhat.com>
c99098
Date: Tue, 15 Jun 2021 19:34:37 +0200
c99098
Subject: [PATCH] cellarea: Don't shrink area too much
c99098
c99098
Do not compute rectangles with negative width/height. This avoids
c99098
assertion failures further down when those rectangles were actually
c99098
checked.
c99098
c99098
https://bugzilla.redhat.com/show_bug.cgi?id=1962215
c99098
---
c99098
 gtk/gtkcellarea.c | 10 ++++++++++
c99098
 1 file changed, 10 insertions(+)
c99098
c99098
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
c99098
index 575e1c7fde..d1b3b1a279 100644
c99098
--- a/gtk/gtkcellarea.c
c99098
+++ b/gtk/gtkcellarea.c
c99098
@@ -3563,8 +3563,18 @@ gtk_cell_area_inner_cell_area (GtkCellArea        *area,
c99098
 
c99098
   *inner_area = *cell_area;
c99098
 
c99098
+  if (border.left + border.right > cell_area->width)
c99098
+    {
c99098
+      border.left = cell_area->width / 2;
c99098
+      border.right = (cell_area->width + 1) / 2;
c99098
+    }
c99098
   inner_area->x += border.left;
c99098
   inner_area->width -= border.left + border.right;
c99098
+  if (border.top + border.bottom > cell_area->height)
c99098
+    {
c99098
+      border.top = cell_area->height / 2;
c99098
+      border.bottom = (cell_area->height + 1) / 2;
c99098
+    }
c99098
   inner_area->y += border.top;
c99098
   inner_area->height -= border.top + border.bottom;
c99098
 }
c99098
-- 
c99098
GitLab
c99098