views/month: Only recalculate layout blocks when needed
The tick callback can be fired *after* the GtkWidget.map() vfunc is called, in which case the recalculate_layout_blocks() will run with an already recalculated layout, which is invalid. Only call recalculate_layout_blocks() when the blocks are invalidated. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/768>
This commit is contained in:
@@ -930,6 +930,7 @@ widget_tick_cb (GtkWidget *widget,
|
|||||||
|
|
||||||
g_assert (GCAL_IS_MONTH_VIEW_ROW (self));
|
g_assert (GCAL_IS_MONTH_VIEW_ROW (self));
|
||||||
|
|
||||||
|
if (!self->layout_blocks_valid)
|
||||||
recalculate_layout_blocks (self);
|
recalculate_layout_blocks (self);
|
||||||
|
|
||||||
GCAL_RETURN (G_SOURCE_REMOVE);
|
GCAL_RETURN (G_SOURCE_REMOVE);
|
||||||
|
|||||||
Reference in New Issue
Block a user