forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
98ee594f73
commit
7eecb16404
@ -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);
|
||||
|
@ -420,6 +420,8 @@ testdata = \
|
||||
textview-margins.ui \
|
||||
toplevel-vs-popup.ref.ui \
|
||||
toplevel-vs-popup.ui \
|
||||
treeview-crash-too-wide.ref.ui \
|
||||
treeview-crash-too-wide.ui \
|
||||
treeview-fixed-height.css \
|
||||
treeview-fixed-height.ref.ui \
|
||||
treeview-fixed-height.ui \
|
||||
|
50
testsuite/reftests/treeview-crash-too-wide.ref.ui
Normal file
50
testsuite/reftests/treeview-crash-too-wide.ref.ui
Normal file
File diff suppressed because one or more lines are too long
50
testsuite/reftests/treeview-crash-too-wide.ui
Normal file
50
testsuite/reftests/treeview-crash-too-wide.ui
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user