kms: Use scaled sizes for placing new outputs
This commit is contained in:
parent
bebd7c5c40
commit
870e5be2a6
4 changed files with 16 additions and 11 deletions
|
|
@ -277,7 +277,7 @@ impl State {
|
|||
) {
|
||||
Ok((output, should_expose)) => {
|
||||
if should_expose {
|
||||
w += output.config().transformed_size().w as u32;
|
||||
w += output.geometry().size.w as u32;
|
||||
wl_outputs.push(output.clone());
|
||||
}
|
||||
device.outputs.insert(conn, output);
|
||||
|
|
@ -345,13 +345,7 @@ impl State {
|
|||
.find_map(|(crtc, surface)| (surface.connector == conn).then_some(crtc))
|
||||
.cloned()
|
||||
{
|
||||
let surface = device.surfaces.remove(&crtc).unwrap();
|
||||
if surface.output.mirroring().is_none() {
|
||||
// TODO: move up later outputs?
|
||||
w = w.saturating_sub(
|
||||
surface.output.config().transformed_size().w as u32,
|
||||
);
|
||||
}
|
||||
device.surfaces.remove(&crtc).unwrap();
|
||||
}
|
||||
|
||||
if !changes.added.iter().any(|(c, _)| c == &conn) {
|
||||
|
|
@ -376,7 +370,7 @@ impl State {
|
|||
) {
|
||||
Ok((output, should_expose)) => {
|
||||
if should_expose {
|
||||
w += output.config().transformed_size().w as u32;
|
||||
w += output.geometry().size.w as u32;
|
||||
outputs_added.push(output.clone());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ impl KmsState {
|
|||
startup_done.clone(),
|
||||
)?;
|
||||
if output.mirroring().is_none() {
|
||||
w += output.config().transformed_size().w as u32;
|
||||
w += output.geometry().size.w as u32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue