Merge pull request #1479 from emersion/lost-crtc-state

backend/drm: fix state for outputs loosing their CRTC
This commit is contained in:
Drew DeVault 2019-01-20 09:02:00 -05:00 committed by GitHub
commit 0db2a687b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 5 deletions

View file

@ -173,8 +173,12 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
void wlr_output_update_mode(struct wlr_output *output,
struct wlr_output_mode *mode) {
output->current_mode = mode;
wlr_output_update_custom_mode(output, mode->width, mode->height,
mode->refresh);
if (mode != NULL) {
wlr_output_update_custom_mode(output, mode->width, mode->height,
mode->refresh);
} else {
wlr_output_update_custom_mode(output, 0, 0, 0);
}
}
void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,