mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/drm: make drm_lease implementation follow docs
This ensures compositors get a output_destroy signal when the lease is granted and a new_output signal when the lease is revoked.
This commit is contained in:
parent
c6de47d415
commit
be555a9a99
1 changed files with 6 additions and 0 deletions
|
|
@ -1762,6 +1762,10 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
|
|||
}
|
||||
}
|
||||
|
||||
if (wlr_conn && wlr_conn->lease) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the hotplug event contains a connector ID, ignore any other
|
||||
// connector.
|
||||
if (event != NULL && event->connector_id != 0 &&
|
||||
|
|
@ -2150,6 +2154,7 @@ struct wlr_drm_lease *wlr_drm_create_lease(struct wlr_output **outputs,
|
|||
get_drm_connector_from_output(outputs[i]);
|
||||
conn->lease = lease;
|
||||
conn->crtc->lease = lease;
|
||||
disconnect_drm_connector(conn);
|
||||
}
|
||||
|
||||
return lease;
|
||||
|
|
@ -2186,4 +2191,5 @@ void drm_lease_destroy(struct wlr_drm_lease *lease) {
|
|||
}
|
||||
|
||||
free(lease);
|
||||
scan_drm_connectors(drm, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue