1
0
Fork 0
forked from wry/wry

rect: safer construction

This commit is contained in:
Stipe Kotarac 2025-12-29 10:42:17 +01:00 committed by Julian Orth
parent 411af0ea18
commit a1dfc473a2
33 changed files with 245 additions and 159 deletions

View file

@ -16,7 +16,10 @@ use {
Axis, Direction,
input::{InputDevice, Seat},
keyboard::{Keymap, ModifiedKeySym},
theme::{BarPosition, sized::BAR_SEPARATOR_WIDTH},
theme::{
BarPosition,
sized::{BAR_SEPARATOR_WIDTH, Resizable},
},
video::{Connector, Transform},
},
std::{cell::Cell, ops::Deref, ptr, rc::Rc, time::Duration},
@ -303,11 +306,12 @@ impl TestConfig {
})
}
pub fn set_size(&self, sized: Resizable, size: i32) -> TestResult {
self.send(ClientMessage::SetSize { sized, size })
}
pub fn set_bar_separator_width(&self, width: i32) -> TestResult {
self.send(ClientMessage::SetSize {
sized: BAR_SEPARATOR_WIDTH,
size: width,
})
self.set_size(BAR_SEPARATOR_WIDTH, width)
}
pub fn set_bar_position(&self, position: BarPosition) -> TestResult {
@ -323,6 +327,10 @@ impl TestConfig {
get_response!(reply, GetShowBar { show });
Ok(show)
}
pub fn set_show_titles(&self, show: bool) -> TestResult {
self.send(ClientMessage::SetShowTitles { show })
}
}
impl Drop for TestConfig {