Skip to content

Commit

Permalink
kms: Don't substract for mirrored outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Oct 25, 2024
1 parent ea27ec5 commit 5207453
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/backend/kms/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,10 @@ impl State {
.cloned()
{
let surface = device.surfaces.remove(&crtc).unwrap();
// TODO: move up later outputs?
w -= surface
.output
.current_mode()
.map(|m| m.size.w as u32)
.unwrap_or(0);
if surface.output.mirroring().is_none() {
// TODO: move up later outputs?
w = w.saturating_sub(surface.output.config().transformed_size().w as u32);
}
}

if !changes.added.iter().any(|(c, _)| c == &conn) {
Expand Down

0 comments on commit 5207453

Please sign in to comment.