chore: smithay update

This commit is contained in:
Victoria Brekenfeld 2024-07-02 13:15:19 +02:00
parent 553c49b42b
commit 2d0f1cbf2b
4 changed files with 21 additions and 7 deletions

View file

@ -402,8 +402,7 @@ impl Surface {
) -> Result<()> {
let (tx, rx) = std::sync::mpsc::sync_channel(1);
self.plane_formats = surface
.planes()
.primary
.plane_info()
.formats
.iter()
.copied()

View file

@ -46,9 +46,24 @@ impl DrmLeaseHandler for State {
.drm
.planes(crtc)
.map_err(LeaseRejected::with_cause)?;
builder.add_plane(planes.primary.handle);
if let Some(cursor) = planes.cursor {
builder.add_plane(cursor.handle);
let (primary_plane, primary_plane_claim) = planes
.primary
.iter()
.find_map(|plane| {
backend
.drm
.claim_plane(plane.handle, *crtc)
.map(|claim| (plane, claim))
})
.ok_or_else(LeaseRejected::default)?;
builder.add_plane(primary_plane.handle, primary_plane_claim);
if let Some((cursor, claim)) = planes.cursor.and_then(|plane| {
backend
.drm
.claim_plane(plane.handle, *crtc)
.map(|claim| (plane, claim))
}) {
builder.add_plane(cursor.handle, claim);
}
} else {
tracing::warn!(