1
0
Fork 0
forked from wry/wry

layer-shell: send configure event when output size changes

This commit is contained in:
Julian Orth 2024-05-08 13:00:23 +02:00
parent 9ac07155ab
commit 06ac1189d0
2 changed files with 7 additions and 2 deletions

View file

@ -292,7 +292,7 @@ impl ZwlrLayerSurfaceV1 {
self.pos.get()
}
pub fn compute_position(&self) {
fn compute_position(&self) {
let Some(global) = self.output.get() else {
return;
};
@ -326,6 +326,11 @@ impl ZwlrLayerSurfaceV1 {
self.client.state.tree_changed();
}
pub fn output_resized(&self) {
self.configure();
self.compute_position();
}
pub fn destroy_node(&self) {
self.link.set(None);
self.mapped.set(false);

View file

@ -558,7 +558,7 @@ impl OutputNode {
}
for layer in &self.layers {
for surface in layer.iter() {
surface.compute_position();
surface.output_resized();
}
}
self.global.send_mode();