backend/drm: take wlr_output_state as arg in commit callers

Instead of relying on wlr_output.pending to be empty when performing
backend-initiated CRTC commits, use a zero wlr_output_state.
This commit is contained in:
Simon Ser 2021-04-06 16:43:48 +02:00 committed by Kenny Levinsen
parent 8f90d7f8f5
commit 1a9701cd7c
3 changed files with 30 additions and 23 deletions

View file

@ -117,11 +117,12 @@ static void handle_session_active(struct wl_listener *listener, void *data) {
scan_drm_connectors(drm);
struct wlr_drm_connector *conn;
wl_list_for_each(conn, &drm->outputs, link){
wl_list_for_each(conn, &drm->outputs, link) {
struct wlr_output_state state = {0};
if (conn->output.enabled && conn->output.current_mode != NULL) {
drm_connector_set_mode(conn, conn->output.current_mode);
drm_connector_set_mode(conn, &state, conn->output.current_mode);
} else {
drm_connector_set_mode(conn, NULL);
drm_connector_set_mode(conn, &state, NULL);
}
}
} else {