diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index 03ebbbf8..114d619a 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -785,6 +785,13 @@ gcal_month_view_size_allocate (GtkWidget *widget, priv = gcal_month_view_get_instance_private (GCAL_MONTH_VIEW (widget)); ppriv = GCAL_SUBSCRIBER_VIEW (widget)->priv; + if (!ppriv->children_changed && + allocation->height == gtk_widget_get_allocated_height (widget) && + allocation->width == gtk_widget_get_allocated_width (widget)) + { + return; + } + /* remove every widget' parts, but the master widget */ widgets = g_hash_table_get_values (ppriv->children); for (aux = widgets; aux != NULL; aux = g_list_next (aux)) @@ -997,6 +1004,8 @@ gcal_month_view_size_allocate (GtkWidget *widget, /* FIXME: remove on Gtk+ 3.15.4 release */ if (g_hash_table_size (ppriv->overflow_cells) != 0) gtk_widget_queue_draw_area (widget, allocation->x, allocation->y, allocation->width, allocation->height); + + ppriv->children_changed = FALSE; } static gboolean diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c index 749ec28a..554407c7 100644 --- a/src/gcal-year-view.c +++ b/src/gcal-year-view.c @@ -428,6 +428,13 @@ gcal_year_view_size_allocate (GtkWidget *widget, priv = gcal_year_view_get_instance_private (GCAL_YEAR_VIEW (widget)); ppriv = GCAL_SUBSCRIBER_VIEW (widget)->priv; + if (!ppriv->children_changed && + allocation->height == gtk_widget_get_allocated_height (widget) && + allocation->width == gtk_widget_get_allocated_width (widget)) + { + return; + } + /* remove every widget' parts, but the master widget */ widgets = g_hash_table_get_values (ppriv->children); for (aux = widgets; aux != NULL; aux = g_list_next (aux)) @@ -625,6 +632,8 @@ gcal_year_view_size_allocate (GtkWidget *widget, /* FIXME: remove on Gtk+ 3.15.4 release */ if (g_hash_table_size (ppriv->overflow_cells) != 0) gtk_widget_queue_draw_area (widget, allocation->x, allocation->y, allocation->width, allocation->height); + + ppriv->children_changed = FALSE; } static gboolean