From a77f8e886b5588ea77bf975be6dda461c1e6e983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 09:50:07 +0200 Subject: [PATCH 01/11] cssprovider: Fix a memory leak in load_internal We create a new GBytes but never unref it. --- gtk/gtkcssprovider.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 6d6571b59b..4943be01f1 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1118,6 +1118,8 @@ gtk_css_provider_load_internal (GtkCssProvider *self, if (parent == NULL) gtk_css_provider_postprocess (self); + + g_bytes_unref (bytes); } } @@ -1149,8 +1151,8 @@ gtk_css_provider_load_from_data (GtkCssProvider *css_provider, gtk_css_provider_reset (css_provider); + g_bytes_ref (bytes); gtk_css_provider_load_internal (css_provider, NULL, NULL, bytes); - g_bytes_unref (bytes); gtk_style_provider_changed (GTK_STYLE_PROVIDER (css_provider)); From d1c37c41d96d0f3126524f26648370daecfe37d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 09:50:44 +0200 Subject: [PATCH 02/11] Add a gtk valgrind suppression file Not ideal but otherwise I get 30k line output from valgrind when just running the widget factory. It's mostly mesa but still. --- gtk.supp | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 gtk.supp diff --git a/gtk.supp b/gtk.supp new file mode 100644 index 0000000000..73921a4b57 --- /dev/null +++ b/gtk.supp @@ -0,0 +1,152 @@ +# Actual GTK things +{ + GtkWidgetClass action GPtrArray + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:g_ptr_array_sized_new + fun:g_ptr_array_new + fun:gtk_widget_class_add_action +} + +{ + GTK media extension gio modules + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:g_slice_alloc0 + fun:g_type_create_instance + fun:g_object_new_internal + fun:g_object_new_with_properties + fun:g_object_new + fun:g_io_module_new + fun:g_io_modules_scan_all_in_directory_with_scope + fun:gtk_media_file_extension_init +} + +# mesa driver stuff +{ + i965 addr4 + Memcheck:Addr4 + obj:/usr/lib/dri/i965_dri.so* +} + +{ + i965 addr8 + Memcheck:Addr8 + obj:/usr/lib/dri/i965_dri.so* +} + +{ + i965 memcpy + Memcheck:Addr8 + fun:memcpy* + obj:/usr/lib/dri/i965_dri.so* +} + +{ + i965 memcpy + Memcheck:Addr2 + fun:memcpy* + obj:/usr/lib/dri/i965_dri.so* +} + +{ + mesa memcmp 8 + Memcheck:Addr8 + fun:*memcmp* + obj:/usr/lib/dri/i965_dri.so* +} + +{ + mesa memcmp 1 + Memcheck:Addr1 + fun:*memcmp* + obj:/usr/lib/dri/i965_dri.so* +} + +{ + mesa memset 8 + Memcheck:Addr8 + fun:*memset* + obj:/usr/lib/dri/i965_dri.so +} + +{ + mesa realpath + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:realpath@@GLIBC_2.3 + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:epoxy_eglInitialize_global_rewrite_ptr +} + +{ + mesa calloc + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:epoxy_eglInitialize_global_rewrite_ptr +} + +{ + mesa malloc + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:/usr/lib/dri/i965_dri.so* +} + +# Fontconfig +{ + FcFontSetList + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:/usr/lib/libfontconfig.so* + obj:/usr/lib/libfontconfig.so* + fun:FcFontSetList +} + +{ + FcFontRenderPrepare + Memcheck:Leak + match-leak-kinds: definite + fun:realloc + obj:/usr/lib/libfontconfig.so* + obj:/usr/lib/libfontconfig.so* + fun:FcFontRenderPrepare +} + +# Pango +{ + pango 1 + Memcheck:Leak + match-leak-kinds: definite + fun:realloc + obj:/usr/lib/libfontconfig.so* + obj:/usr/lib/libfontconfig.so* + obj:/usr/lib/libcairo.so* + fun:pango_cairo_fc_font_map_fontset_key_substitute +} + From 4123c85021844cf44e0a6a9fd5769af7251b0593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 07:13:41 +0200 Subject: [PATCH 03/11] actionmuxer: Plug a memory leak --- gtk/gtkactionmuxer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c index 6b4fb9a654..521f77e6f0 100644 --- a/gtk/gtkactionmuxer.c +++ b/gtk/gtkactionmuxer.c @@ -803,6 +803,8 @@ gtk_action_muxer_finalize (GObject *object) if (muxer->primary_accels) g_hash_table_unref (muxer->primary_accels); + g_free (muxer->widget_actions_enabled); + G_OBJECT_CLASS (gtk_action_muxer_parent_class) ->finalize (object); } From 1459ca2c26d3d09fc29e7e1e73be34607771e195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 09:57:35 +0200 Subject: [PATCH 04/11] widget factory: Plug a memory leak --- demos/widget-factory/widget-factory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 1197f19588..24dfa14f2a 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -1405,8 +1405,10 @@ text_view_add_to_context_menu (GtkTextView *text_view) item = g_menu_item_new (_("Underline"), "format.underline"); g_menu_item_set_attribute (item, "touch-icon", "s", "format-text-underline-symbolic"); g_menu_append_item (G_MENU (menu), item); + g_object_unref (item); gtk_text_view_set_extra_menu (text_view, G_MENU_MODEL (menu)); + g_object_unref (menu); g_signal_connect (gtk_text_view_get_buffer (text_view), "changed", G_CALLBACK (text_changed), NULL); g_signal_connect (gtk_text_view_get_buffer (text_view), "mark-set", G_CALLBACK (text_changed), NULL); From 449c96ffb31ba4e3e0fa8e7ac8435537617fb446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 10:26:11 +0200 Subject: [PATCH 05/11] widget: Unref previous transform --- gtk/gtkwidget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 42ba750375..880b2c619d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4468,6 +4468,7 @@ gtk_widget_allocate (GtkWidget *widget, if (adjusted.x || adjusted.y) transform = gsk_transform_translate (transform, &GRAPHENE_POINT_INIT (adjusted.x, adjusted.y)); + gsk_transform_unref (priv->transform); priv->transform = transform; if (priv->surface_transform_data) From dbc49e7742d4c6606a16d7b620729a4a4506166e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 12:56:28 +0200 Subject: [PATCH 06/11] transform: Fix identity transform fast paths Returning an extra ref will cause leaks later. --- gsk/gsktransform.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c index 9af2ce352b..963ca699ed 100644 --- a/gsk/gsktransform.c +++ b/gsk/gsktransform.c @@ -646,7 +646,7 @@ gsk_transform_translate_3d (GskTransform *next, GskTranslateTransform *result; if (graphene_point3d_equal (point, graphene_point3d_zero ())) - return gsk_transform_ref (next); + return next; if (gsk_transform_has_class (next, &GSK_TRANSLATE_TRANSFORM_CLASS)) { @@ -801,7 +801,7 @@ gsk_transform_rotate (GskTransform *next, GskRotateTransform *result; if (angle == 0.0f) - return gsk_transform_ref (next); + return next; if (gsk_transform_has_class (next, &GSK_ROTATE_TRANSFORM_CLASS)) { @@ -932,7 +932,7 @@ gsk_transform_rotate_3d (GskTransform *next, return gsk_transform_rotate (next, angle); if (angle == 0.0f) - return gsk_transform_ref (next); + return next; result = gsk_transform_alloc (&GSK_ROTATE3D_TRANSFORM_CLASS, GSK_TRANSFORM_CATEGORY_3D, @@ -1121,7 +1121,7 @@ gsk_transform_scale_3d (GskTransform *next, GskScaleTransform *result; if (factor_x == 1 && factor_y == 1 && factor_z == 1) - return gsk_transform_ref (next); + return next; if (gsk_transform_has_class (next, &GSK_SCALE_TRANSFORM_CLASS)) { @@ -1250,7 +1250,7 @@ gsk_transform_perspective (GskTransform *next, float depth) { GskPerspectiveTransform *result; - + if (gsk_transform_has_class (next, &GSK_PERSPECTIVE_TRANSFORM_CLASS)) { GskTransform *r = gsk_transform_perspective (gsk_transform_ref (next->next), From 95f30fee87ed91d6702aabf2689758030e8702af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 12:57:36 +0200 Subject: [PATCH 07/11] iconhelper: Try to avoid some save/restore calls GtkImage already does something similar so we often end up with 0/0 here. Avoid the save()/restore() calls in GtkSnapshot in that case. --- gtk/gtkiconhelper.c | 61 ++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 5698b2bdbc..a7cf18220f 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -227,19 +227,35 @@ gtk_icon_helper_paintable_snapshot (GdkPaintable *paintable, h = MIN (h, height); x = (width - w) / 2; y = (height - h) / 2; - gtk_snapshot_save (snapshot); - gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y)); - gtk_css_style_snapshot_icon_paintable (style, - snapshot, - self->paintable, - w, h, - self->texture_is_symbolic); - gtk_snapshot_restore (snapshot); + + if (x != 0 || y != 0) + { + gtk_snapshot_save (snapshot); + gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y)); + gtk_css_style_snapshot_icon_paintable (style, + snapshot, + self->paintable, + w, h, + self->texture_is_symbolic); + gtk_snapshot_restore (snapshot); + } + else + { + gtk_css_style_snapshot_icon_paintable (style, + snapshot, + self->paintable, + w, h, + self->texture_is_symbolic); + + } + } break; - case GTK_IMAGE_PAINTABLE: case GTK_IMAGE_EMPTY: + break; + + case GTK_IMAGE_PAINTABLE: default: { double image_ratio = (double) width / height; @@ -269,14 +285,25 @@ gtk_icon_helper_paintable_snapshot (GdkPaintable *paintable, x = floor (width - ceil (w)) / 2; y = floor (height - ceil (h)) / 2; - gtk_snapshot_save (snapshot); - gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y)); - gtk_css_style_snapshot_icon_paintable (style, - snapshot, - self->paintable, - w, h, - self->texture_is_symbolic); - gtk_snapshot_restore (snapshot); + if (x != 0 || y != 0) + { + gtk_snapshot_save (snapshot); + gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y)); + gtk_css_style_snapshot_icon_paintable (style, + snapshot, + self->paintable, + w, h, + self->texture_is_symbolic); + gtk_snapshot_restore (snapshot); + } + else + { + gtk_css_style_snapshot_icon_paintable (style, + snapshot, + self->paintable, + w, h, + self->texture_is_symbolic); + } } break; } From b062594ae65ed907eabff73df8cfb5036e21d20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Jul 2019 13:38:55 +0200 Subject: [PATCH 08/11] gl renderer: Properly clean up program state transforms --- gsk/gl/gskglrenderer.c | 1 + gsk/gl/gskglrenderops.c | 12 ++++++++++++ gsk/gl/gskglrenderopsprivate.h | 1 + 3 files changed, 14 insertions(+) diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index f464c728a5..46c9e64c1c 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -2342,6 +2342,7 @@ gsk_gl_renderer_dispose (GObject *gobject) GskGLRenderer *self = GSK_GL_RENDERER (gobject); g_clear_pointer (&self->render_ops, g_array_unref); + ops_free (&self->op_builder); G_OBJECT_CLASS (gsk_gl_renderer_parent_class)->dispose (gobject); } diff --git a/gsk/gl/gskglrenderops.c b/gsk/gl/gskglrenderops.c index b23e8c5cde..7c02442d08 100644 --- a/gsk/gl/gskglrenderops.c +++ b/gsk/gl/gskglrenderops.c @@ -187,6 +187,17 @@ ops_init (RenderOpBuilder *builder) } } +void +ops_free (RenderOpBuilder *builder) +{ + int i; + + for (i = 0; i < GL_N_PROGRAMS; i ++) + { + gsk_transform_unref (builder->program_state[i].modelview); + } +} + void ops_set_program (RenderOpBuilder *builder, const Program *program) @@ -225,6 +236,7 @@ ops_set_program (RenderOpBuilder *builder, op.op = OP_CHANGE_MODELVIEW; gsk_transform_to_matrix (builder->current_modelview, &op.modelview); g_array_append_val (builder->render_ops, op); + gsk_transform_unref (program_state->modelview); program_state->modelview = gsk_transform_ref (builder->current_modelview); } diff --git a/gsk/gl/gskglrenderopsprivate.h b/gsk/gl/gskglrenderopsprivate.h index 84bafa74a0..b58f01af05 100644 --- a/gsk/gl/gskglrenderopsprivate.h +++ b/gsk/gl/gskglrenderopsprivate.h @@ -290,6 +290,7 @@ void ops_dump_framebuffer (RenderOpBuilder *builder, int width, int height); void ops_init (RenderOpBuilder *builder); +void ops_free (RenderOpBuilder *builder); void ops_push_debug_group (RenderOpBuilder *builder, const char *text); void ops_pop_debug_group (RenderOpBuilder *builder); From 042f7d117f4d0db6cb2074402cd8e4f6753e6318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 7 Jul 2019 07:23:05 +0200 Subject: [PATCH 09/11] compare-render: Don't unref an invalid GFile We already unref it when the g_file_make_directory_with_parents fails. --- testsuite/gsk/compare-render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/gsk/compare-render.c b/testsuite/gsk/compare-render.c index a0e68a37cd..59a0bd2a3c 100644 --- a/testsuite/gsk/compare-render.c +++ b/testsuite/gsk/compare-render.c @@ -44,8 +44,8 @@ get_output_dir (void) } g_error_free (error); } - - g_object_unref (file); + else + g_object_unref (file); return output_dir; } From 633172fd661717cdfcb3ff41ca48851e4c712cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 7 Jul 2019 07:36:29 +0200 Subject: [PATCH 10/11] widget: Make queue_compute_expand() private Nobody needs to call this anymore. --- docs/reference/gtk/gtk4-sections.txt | 1 - gtk/gtkwidget.c | 4 +++- gtk/gtkwidget.h | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 6dc672ce8f..5c6108bc44 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4604,7 +4604,6 @@ gtk_widget_get_vexpand gtk_widget_set_vexpand gtk_widget_get_vexpand_set gtk_widget_set_vexpand_set -gtk_widget_queue_compute_expand gtk_widget_compute_expand diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 880b2c619d..ceda569793 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -713,6 +713,8 @@ static gboolean gtk_widget_class_get_visible_by_default (GtkWidgetClass *widget_ static void remove_parent_surface_transform_changed_listener (GtkWidget *widget); static void add_parent_surface_transform_changed_listener (GtkWidget *widget); +static void gtk_widget_queue_compute_expand (GtkWidget *widget); + /* --- variables --- */ @@ -8955,7 +8957,7 @@ gtk_widget_update_computed_expand (GtkWidget *widget) * * See gtk_widget_compute_expand(). */ -void +static void gtk_widget_queue_compute_expand (GtkWidget *widget) { GtkWidget *parent; diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index a842d89031..f9a3d50005 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -645,8 +645,6 @@ GDK_AVAILABLE_IN_ALL void gtk_widget_set_vexpand_set (GtkWidget *widget, gboolean set); GDK_AVAILABLE_IN_ALL -void gtk_widget_queue_compute_expand (GtkWidget *widget); -GDK_AVAILABLE_IN_ALL gboolean gtk_widget_compute_expand (GtkWidget *widget, GtkOrientation orientation); From 264d4bada615ca588953e47af32abe6f33bcea3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 7 Jul 2019 07:43:08 +0200 Subject: [PATCH 11/11] widget: Remove queue_resize_no_redraw We always invalidate the widget in size_allocate() anyway. --- docs/reference/gtk/gtk4-sections.txt | 1 - gtk/gtkcalendar.c | 4 ++-- gtk/gtktextview.c | 2 +- gtk/gtktoolbar.c | 8 ++++---- gtk/gtktreeview.c | 4 ++-- gtk/gtkwidget.c | 15 --------------- gtk/gtkwidget.h | 2 -- gtk/gtkwindow.c | 8 ++++---- 8 files changed, 13 insertions(+), 31 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 5c6108bc44..a20c4d302e 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4432,7 +4432,6 @@ gtk_widget_realize gtk_widget_unrealize gtk_widget_queue_draw gtk_widget_queue_resize -gtk_widget_queue_resize_no_redraw gtk_widget_queue_allocate gtk_widget_get_frame_clock gtk_widget_get_scale_factor diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 0b45d241f2..b8acd5bd2f 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -3474,7 +3474,7 @@ gtk_calendar_set_detail_width_chars (GtkCalendar *calendar, { priv->detail_width_chars = chars; g_object_notify (G_OBJECT (calendar), "detail-width-chars"); - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (calendar)); + gtk_widget_queue_resize (GTK_WIDGET (calendar)); } } @@ -3498,7 +3498,7 @@ gtk_calendar_set_detail_height_rows (GtkCalendar *calendar, { priv->detail_height_rows = rows; g_object_notify (G_OBJECT (calendar), "detail-height-rows"); - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (calendar)); + gtk_widget_queue_resize (GTK_WIDGET (calendar)); } } diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index eeede5d3a6..baaf8e4bff 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4449,7 +4449,7 @@ changed_handler (GtkTextLayout *layout, tmp_list = tmp_list->next; } - gtk_widget_queue_resize_no_redraw(widget); + gtk_widget_queue_resize(widget); } } diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 93ecd03c04..667d80961c 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -933,13 +933,13 @@ slide_idle_handler (gpointer data) if (cont) { - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar)); + gtk_widget_queue_resize (GTK_WIDGET (toolbar)); return TRUE; } } - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar)); + gtk_widget_queue_resize (GTK_WIDGET (toolbar)); priv->is_sliding = FALSE; priv->idle_id = 0; @@ -1052,7 +1052,7 @@ gtk_toolbar_begin_sliding (GtkToolbar *toolbar) * so that the idle handler will not immediately return * FALSE */ - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar)); + gtk_widget_queue_resize (GTK_WIDGET (toolbar)); g_timer_reset (priv->timer); } @@ -1086,7 +1086,7 @@ gtk_toolbar_stop_sliding (GtkToolbar *toolbar) } } - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (toolbar)); + gtk_widget_queue_resize (GTK_WIDGET (toolbar)); } } diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index a73c54a6c6..5db4a159e2 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -6311,7 +6311,7 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) MAX (gtk_adjustment_get_upper (tree_view->priv->vadjustment), requisition.height)); if (queue_resize) - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (tree_view)); + gtk_widget_queue_resize (GTK_WIDGET (tree_view)); } if (path) gtk_tree_path_free (path); @@ -8319,7 +8319,7 @@ gtk_tree_view_row_inserted (GtkTreeModel *model, if (node_visible && node_is_visible (tree_view, tree, tmpnode)) gtk_widget_queue_resize (GTK_WIDGET (tree_view)); else - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (tree_view)); + gtk_widget_queue_resize (GTK_WIDGET (tree_view)); } else install_presize_handler (tree_view); diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index ceda569793..6bd8ab73ce 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4161,21 +4161,6 @@ gtk_widget_queue_resize (GtkWidget *widget) gtk_widget_queue_resize_internal (widget); } -/** - * gtk_widget_queue_resize_no_redraw: - * @widget: a #GtkWidget - * - * This function works like gtk_widget_queue_resize(), - * except that the widget is not invalidated. - **/ -void -gtk_widget_queue_resize_no_redraw (GtkWidget *widget) -{ - g_return_if_fail (GTK_IS_WIDGET (widget)); - - gtk_widget_queue_resize_internal (widget); -} - /** * gtk_widget_get_frame_clock: * @widget: a #GtkWidget diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index f9a3d50005..3f383ad2a9 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -375,8 +375,6 @@ void gtk_widget_queue_draw (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_queue_resize (GtkWidget *widget); GDK_AVAILABLE_IN_ALL -void gtk_widget_queue_resize_no_redraw (GtkWidget *widget); -GDK_AVAILABLE_IN_ALL void gtk_widget_queue_allocate (GtkWidget *widget); GDK_AVAILABLE_IN_ALL GdkFrameClock* gtk_widget_get_frame_clock (GtkWidget *widget); diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index dab50be990..963d1fa088 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -4367,7 +4367,7 @@ gtk_window_set_default_size_internal (GtkWindow *window, g_object_thaw_notify (G_OBJECT (window)); - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window)); + gtk_widget_queue_resize (GTK_WIDGET (window)); } /** @@ -4498,7 +4498,7 @@ gtk_window_resize (GtkWindow *window, info->resize_width = width; info->resize_height = height; - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window)); + gtk_widget_queue_resize (GTK_WIDGET (window)); } /** @@ -7129,7 +7129,7 @@ gtk_window_move_resize (GtkWindow *window) * to postpone our configure request until later. */ info->last = saved_last_info; - gtk_widget_queue_resize_no_redraw (widget); /* might recurse for GTK_RESIZE_IMMEDIATE */ + gtk_widget_queue_resize (widget); /* might recurse for GTK_RESIZE_IMMEDIATE */ } return; /* Bail out, we didn't really process the move/resize */ @@ -7963,7 +7963,7 @@ gtk_window_set_resizable (GtkWindow *window, update_window_buttons (window); - gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window)); + gtk_widget_queue_resize (GTK_WIDGET (window)); g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_RESIZABLE]); }