kms: Don't substract for mirrored outputs

This commit is contained in:
Victoria Brekenfeld 2024-10-25 10:42:38 +02:00
parent ea27ec5e28
commit 5207453157

View file

@ -305,12 +305,10 @@ impl State {
.cloned() .cloned()
{ {
let surface = device.surfaces.remove(&crtc).unwrap(); let surface = device.surfaces.remove(&crtc).unwrap();
if surface.output.mirroring().is_none() {
// TODO: move up later outputs? // TODO: move up later outputs?
w -= surface w = w.saturating_sub(surface.output.config().transformed_size().w as u32);
.output }
.current_mode()
.map(|m| m.size.w as u32)
.unwrap_or(0);
} }
if !changes.added.iter().any(|(c, _)| c == &conn) { if !changes.added.iter().any(|(c, _)| c == &conn) {