[gtk+/gtk-3-14] Don't pass invalid rectangles to cairo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Don't pass invalid rectangles to cairo
- Date: Mon, 23 Mar 2015 03:32:34 +0000 (UTC)
commit 6a6350b855437a97b6498595339aae77ef692648
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 16 12:51:56 2015 -0400
Don't pass invalid rectangles to cairo
This causes pixman warnings, or worse.
Clearly, something is not quite right here, if we end up
redrawing tabs at a time when the allocation is set to (1, 1).
For now, avoid straining the error handling in the lower layers.
https://bugzilla.gnome.org/show_bug.cgi?id=746301
gtk/gtknotebook.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 3834ecd..eff972d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4803,7 +4803,7 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
page->allocation.height - padding.bottom;
/* fall through */
case GTK_POS_TOP:
- redraw_rect.width = allocation.width - 2 * border;
+ redraw_rect.width = MAX (1, allocation.width - 2 * border);
redraw_rect.height = page->allocation.height + padding.top;
break;
@@ -4814,7 +4814,7 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
/* fall through */
case GTK_POS_LEFT:
redraw_rect.width = page->allocation.width + padding.left;
- redraw_rect.height = allocation.height - 2 * border;
+ redraw_rect.height = MAX (1, allocation.height - 2 * border);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]