diff options
author | Benjamin Otte <otte@redhat.com> | 2015-01-24 03:29:18 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-02-05 18:57:29 +0100 |
commit | 7eecb16404b9fdcd1377e1a159f5e94f079e24b7 (patch) | |
tree | 5166e9557c618aabc695b5ceb9d2e38423a598d0 /gtk/gtktreeview.c | |
parent | 98ee594f7347e363834bffbec7320c71ac18637e (diff) | |
download | gtk+-7eecb16404b9fdcd1377e1a159f5e94f079e24b7.tar.gz |
treeview: Don't create an overly large pixel cache
GPUs generally have problems when you create a 35000px wide surface.
Luckily X catches this and sends a BadAlloc. Which GTK immediately
abort()s on.
Testcase included.
https://bugzilla.redhat.com/show_bug.cgi?id=1163579
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r-- | gtk/gtktreeview.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index f43231f50d..c471c6b830 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -5580,8 +5580,8 @@ gtk_tree_view_draw (GtkWidget *widget, view_rect.x = 0; view_rect.y = gtk_tree_view_get_effective_header_height (tree_view); - view_rect.width = gdk_window_get_width (tree_view->priv->bin_window); - view_rect.height = gdk_window_get_height (tree_view->priv->bin_window); + view_rect.width = gtk_widget_get_allocated_width (widget); + view_rect.height = gtk_widget_get_allocated_width (widget) - view_rect.y; gdk_window_get_position (tree_view->priv->bin_window, &canvas_rect.x, &canvas_rect.y); canvas_rect.y = -gtk_adjustment_get_value (tree_view->priv->vadjustment); |