Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add connector_id to DrmWindowHandle #170

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ impl DrmDisplayHandle {
pub struct DrmWindowHandle {
/// The primary drm plane handle.
pub plane: u32,
pub connector_id: Option<NonZeroU32>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should document what is it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also ideally with links to other documentation explaining it, if such docs exist.

}

impl DrmWindowHandle {
Expand All @@ -255,7 +256,10 @@ impl DrmWindowHandle {
/// let handle = DrmWindowHandle::new(plane);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this example to also set the connector_id

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean here is something like:

Suggested change
/// let handle = DrmWindowHandle::new(plane);
/// # connector_id = unsafe { NonZeroU32::new_unchecked(1) };
/// let mut handle = DrmWindowHandle::new(plane);
/// handle.connector_id = Some(connector_id);

/// ```
pub fn new(plane: u32) -> Self {
Self { plane }
Self {
plane,
connector_id: None,
}
}
}

Expand Down
Loading