1
0
Fork 0
forked from wry/wry

Merge pull request #171 from mahkoh/jorth/fix-layer-shell-abs-pos

tree: fix positioning of layer-shell surfaces
This commit is contained in:
mahkoh 2024-04-20 21:08:50 +02:00 committed by GitHub
commit 2fe8570641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -322,10 +322,11 @@ impl ZwlrLayerSurfaceV1 {
} else if anchor.contains(BOTTOM) {
y1 += opos.height() - height;
}
let rect = Rect::new_sized(x1, y1, width, height).unwrap();
self.output_pos.set(rect);
self.pos.set(rect.move_(opos.x1(), opos.y1()));
self.surface.set_absolute_position(x1, y1);
let o_rect = Rect::new_sized(x1, y1, width, height).unwrap();
let a_rect = o_rect.move_(opos.x1(), opos.y1());
self.output_pos.set(o_rect);
self.pos.set(a_rect);
self.surface.set_absolute_position(a_rect.x1(), a_rect.y1());
self.client.state.tree_changed();
}