+ /* If we clear the frame we have to force its contents to be redrawn. */
+ if (f->clear)
+ f->frame_changed = 1;
+
+ /* invalidate the subwindow cache. We use subwindows_changed here to
+ cause subwindows to get instantiated. This is because
+ subwindows_state_changed is less strict - dealing with things
+ like the clicked state of button. We have to do this before
+ redisplaying the gutters as subwindows get unmapped in the
+ process.*/
+ if (!Dynarr_length (f->subwindow_cachels)
+ || f->subwindows_changed
+ || f->faces_changed
+ || f->frame_changed)
+ {
+ reset_subwindow_cachels (f);
+ /* we have to do this so the gutter gets regenerated. */
+ reset_gutter_display_lines (f);
+ }
+ else
+ mark_subwindow_cachels_as_not_updated (f);
+ /* We can now update the gutters, safe in the knowledge that our
+ efforts won't get undone. */
+ update_frame_gutters (f);
+