From 5e530b8263035b376577a04aaa51c75756611719 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sun, 26 Apr 2020 22:17:30 +0200 Subject: [PATCH] drm: better describe add_connector usage --- src/backend/drm/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/drm/mod.rs b/src/backend/drm/mod.rs index 1eb3e76..5611b79 100644 --- a/src/backend/drm/mod.rs +++ b/src/backend/drm/mod.rs @@ -169,6 +169,11 @@ pub trait Surface { /// Tries to add a new [`connector`](drm::control::connector) /// to be used after the next commit. /// + /// **Warning**: You need to make sure, that the connector is not used with another surface + /// or was properly removed via `remove_connector` + `commit` before adding it to another surface. + /// Behavior if failing to do so is undefined, but might result in rendering errors or the connector + /// getting removed from the other surface without updating it's internal state. + /// /// Fails if the `connector` is not compatible with the underlying [`crtc`](drm::control::crtc) /// (e.g. no suitable [`encoder`](drm::control::encoder) may be found) /// or is not compatible with the currently pending