mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
Fix error when reconnecting external display
Reconnecting an external display fails on initial page-flip. This occurs when the pageflip_pending flag has been set on the connector at the time the monitor is removed. Once the connector's CRTC has been deallocated, page_flip_handler cannot find the connector by its crtc_id, so pageflip_pending will remain set. This causes initialization to fail when the monitor is reconnected with the error messages: Skipping pageflip on output 'X' Failed to initialize renderer on connector 'X': initial page-flip failed To fix this problem, clear the pageflip_pending flag when cleaning up the connector.
This commit is contained in:
parent
22d345d982
commit
044a9f28d6
1 changed files with 1 additions and 0 deletions
|
@ -1677,6 +1677,7 @@ static void drm_connector_cleanup(struct wlr_drm_connector *conn) {
|
||||||
dealloc_crtc(conn);
|
dealloc_crtc(conn);
|
||||||
conn->possible_crtc = 0;
|
conn->possible_crtc = 0;
|
||||||
conn->desired_mode = NULL;
|
conn->desired_mode = NULL;
|
||||||
|
conn->pageflip_pending = false;
|
||||||
wlr_signal_emit_safe(&conn->output.events.destroy, &conn->output);
|
wlr_signal_emit_safe(&conn->output.events.destroy, &conn->output);
|
||||||
break;
|
break;
|
||||||
case WLR_DRM_CONN_DISCONNECTED:
|
case WLR_DRM_CONN_DISCONNECTED:
|
||||||
|
|
Loading…
Reference in a new issue