Skip to content
  • Alexander Larsson's avatar
    gdkframeclock: Loop the layout phase if needed · c3bff30b
    Alexander Larsson authored
    In the case where the layout phase queued a layout we don't
    want to progress to the paint phase with invalid allocations, so
    we loop the layout. This shouldn't normally happen, but it may
    happen in some edge cases like if user/wm resizes clash with
    natural window size changes from a gtk widget. This should not
    generally loop though, so we detect this after 4 cycles and
    print a warning.
    
    This was detected because of an issue in GtkWindow where it
    seems to incorrectly handle the case of a user interactive resize.
    It seems gtk_window_move_resize() believes that configure_request_size_changed
    changed due to hitting some corner case so it calls
    gtk_widget_queue_resize_no_redraw(), marking the window as need_alloc
    after the layout phase. This commit fixes the issue, but we should
    also look into if we can fix that.
    c3bff30b