forked from AuroraMiddleware/gtk
textview: Remove size_changed check in size-allocate
It's broken and we only hit size-allocate when the size changes anyway.
This commit is contained in:
parent
f7bc5fcae3
commit
dc473b4180
@ -4186,7 +4186,6 @@ static void
|
||||
gtk_text_view_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkAllocation widget_allocation;
|
||||
GtkTextView *text_view;
|
||||
GtkTextViewPrivate *priv;
|
||||
gint width, height;
|
||||
@ -4195,18 +4194,12 @@ gtk_text_view_size_allocate (GtkWidget *widget,
|
||||
GdkRectangle right_rect;
|
||||
GdkRectangle top_rect;
|
||||
GdkRectangle bottom_rect;
|
||||
gboolean size_changed;
|
||||
|
||||
text_view = GTK_TEXT_VIEW (widget);
|
||||
priv = text_view->priv;
|
||||
|
||||
DV(g_print(G_STRLOC"\n"));
|
||||
|
||||
gtk_widget_get_allocation (widget, &widget_allocation);
|
||||
size_changed =
|
||||
widget_allocation.width != allocation->width ||
|
||||
widget_allocation.height != allocation->height;
|
||||
|
||||
/* distribute width/height among child windows. Ensure all
|
||||
* windows get at least a 1x1 allocation.
|
||||
*/
|
||||
@ -4305,12 +4298,6 @@ gtk_text_view_size_allocate (GtkWidget *widget,
|
||||
*/
|
||||
gtk_text_view_flush_first_validate (text_view);
|
||||
|
||||
/* widget->window doesn't get auto-redrawn as the layout is computed, so has to
|
||||
* be invalidated
|
||||
*/
|
||||
if (size_changed)
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
gtk_widget_set_clip (widget, allocation);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user