1
0
Fork 0
forked from wry/wry

it: add test for preferred buffer scale

This commit is contained in:
Julian Orth 2024-04-02 13:33:56 +02:00
parent 9cddeb964d
commit 80dead55c3
5 changed files with 50 additions and 1 deletions

View file

@ -3,6 +3,7 @@ use {
backend::InputDeviceId,
ifs::wl_seat::SeatId,
it::test_error::{TestError, TestResult},
tree::OutputNode,
utils::{copyhashmap::CopyHashMap, stack::Stack},
},
bincode::Options,
@ -15,6 +16,7 @@ use {
},
input::{InputDevice, Seat},
keyboard::{Keymap, ModifiedKeySym},
video::Connector,
Axis, Direction,
},
std::{cell::Cell, ops::Deref, ptr, rc::Rc},
@ -251,6 +253,13 @@ impl TestConfig {
}
}
}
pub fn set_scale(&self, output: &OutputNode, scale: f64) -> TestResult {
self.send(ClientMessage::ConnectorSetScale {
connector: Connector(output.global.connector.connector.id().raw() as _),
scale,
})
}
}
impl Drop for TestConfig {