Add xdg positioner fixup

This commit is contained in:
Val Packett 2026-03-06 02:53:15 -03:00
parent 20e16ca508
commit 8dce5e323a
2 changed files with 114 additions and 15 deletions

View file

@ -178,10 +178,20 @@ impl Deco {
)
}
pub fn transform_size(&self, width: i32, height: i32) -> (i32, i32) {
(
width + self.border_size * 2,
height + self.top_size + self.border_size,
)
}
pub fn transform_anchor(&self, x: i32, y: i32) -> (i32, i32) {
(x + self.border_size, y + self.top_size)
}
fn draw(&self) -> eyre::Result<Rc<WlBuffer>> {
let bounds = self.bounds.borrow();
let width = bounds.width + 2 * self.border_size;
let height = bounds.height + self.top_size + self.border_size;
let (width, height) = self.transform_size(bounds.width, bounds.height);
log::info!("{:?} -> {}x{}", bounds, width, height);
let mut pool = self.pool.borrow_mut();