1
0
Fork 0
forked from wry/wry

backend: fix centering of seat on connector

This commit is contained in:
Julian Orth 2024-02-27 23:57:20 +01:00
parent 7d3b8b6278
commit 79df8d69f4

View file

@ -269,8 +269,7 @@ impl ConnectorHandler {
for seat in seats.values() {
if seat.get_output().id == on.id {
let tpos = target.global.pos.get();
let tmode = target.global.mode.get();
seat.set_position(tpos.x1() + tmode.width / 2, tpos.y1() + tmode.height / 2);
seat.set_position((tpos.x1() + tpos.x2()) / 2, (tpos.y1() + tpos.y2()) / 2);
}
}
if let Some(dev) = &self.data.drm_dev {