mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
output: don't emit the mode event if it hasn't changed
This also fixes #535.
This commit is contained in:
parent
63763d3279
commit
94fa6c88f4
3 changed files with 16 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue