mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-08 19:50:21 +00:00
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,
|
gtk_text_view_size_allocate (GtkWidget *widget,
|
||||||
GtkAllocation *allocation)
|
GtkAllocation *allocation)
|
||||||
{
|
{
|
||||||
GtkAllocation widget_allocation;
|
|
||||||
GtkTextView *text_view;
|
GtkTextView *text_view;
|
||||||
GtkTextViewPrivate *priv;
|
GtkTextViewPrivate *priv;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
@ -4195,18 +4194,12 @@ gtk_text_view_size_allocate (GtkWidget *widget,
|
|||||||
GdkRectangle right_rect;
|
GdkRectangle right_rect;
|
||||||
GdkRectangle top_rect;
|
GdkRectangle top_rect;
|
||||||
GdkRectangle bottom_rect;
|
GdkRectangle bottom_rect;
|
||||||
gboolean size_changed;
|
|
||||||
|
|
||||||
text_view = GTK_TEXT_VIEW (widget);
|
text_view = GTK_TEXT_VIEW (widget);
|
||||||
priv = text_view->priv;
|
priv = text_view->priv;
|
||||||
|
|
||||||
DV(g_print(G_STRLOC"\n"));
|
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
|
/* distribute width/height among child windows. Ensure all
|
||||||
* windows get at least a 1x1 allocation.
|
* 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);
|
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);
|
gtk_widget_set_clip (widget, allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user