aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm/drm.h
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-10 12:48:29 +0100
committerSimon Ser <contact@emersion.fr>2022-11-11 22:44:53 +0000
commit1c4a625fe3e6bc3317d3e1816eee4a701a36c588 (patch)
tree7cfcf922fa92211ad5e18a2344d1a42bf193be72 /include/backend/drm/drm.h
parented71915742160f2b9157adbad79364e22ab7ebda (diff)
backend/drm: ensure disconnected outputs are disabled after VT switch
The following situation can be dangerous: - Output DP-1 is plugged in, compositor enables it. - User VT switches away. - User unplugs DP-1. - User VT switches back. - scan_drm_connectors() figures out the output is now disconnected, uninitializes the struct wlr_output. - The loop restoring previous output state in handle_session_active() accesses the struct wlr_output to figure out what to restore. By chance, we zero out the struct wlr_output after uninitializing it, so enabled and current_mode will always be zero. But let's make sure we handle this case explicitly, to remind future readers that it exists and make the code less fragile.
Diffstat (limited to 'include/backend/drm/drm.h')
0 files changed, 0 insertions, 0 deletions