diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-17 21:08:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 21:08:27 -0400 |
commit | dbdc63ddde4d1e8a76dc80a64d8910ed30aad318 (patch) | |
tree | 14b6692103a841d5eadcaeb980a85caff0625d40 /backend | |
parent | 7c8c81c3a41e7145b69af4556a6a04d16b8cbad2 (diff) | |
parent | 94fa6c88f4eb956c75fce6c65acb335f4f9a4a07 (diff) |
Merge pull request #873 from emersion/output-dont-emit-mode-twice
output: don't emit the mode event if it hasn't changed
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 187db368..fcc435e6 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -496,11 +496,15 @@ static bool wlr_drm_connector_set_mode(struct wlr_output *output, conn->state = WLR_DRM_CONN_CONNECTED; wlr_output_update_mode(&conn->output, mode); + // When switching VTs, the mode is not updated but the buffers become + // invalid, so we need to manually damage the output here + wlr_output_damage_whole(&conn->output); + // Since realloc_crtcs can deallocate planes on OTHER outputs, - // we actually need to reinitialize any than has changed + // we actually need to reinitialize any that has changed ssize_t output_index = -1; wl_list_for_each(conn, &drm->outputs, link) { - output_index += 1; + output_index++; struct wlr_output_mode *mode = conn->output.current_mode; struct wlr_drm_crtc *crtc = conn->crtc; |