layer-shell: send configure event when output size changes
This commit is contained in:
parent
9ac07155ab
commit
06ac1189d0
2 changed files with 7 additions and 2 deletions
|
|
@ -292,7 +292,7 @@ impl ZwlrLayerSurfaceV1 {
|
||||||
self.pos.get()
|
self.pos.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compute_position(&self) {
|
fn compute_position(&self) {
|
||||||
let Some(global) = self.output.get() else {
|
let Some(global) = self.output.get() else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
@ -326,6 +326,11 @@ impl ZwlrLayerSurfaceV1 {
|
||||||
self.client.state.tree_changed();
|
self.client.state.tree_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn output_resized(&self) {
|
||||||
|
self.configure();
|
||||||
|
self.compute_position();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn destroy_node(&self) {
|
pub fn destroy_node(&self) {
|
||||||
self.link.set(None);
|
self.link.set(None);
|
||||||
self.mapped.set(false);
|
self.mapped.set(false);
|
||||||
|
|
|
||||||
|
|
@ -558,7 +558,7 @@ impl OutputNode {
|
||||||
}
|
}
|
||||||
for layer in &self.layers {
|
for layer in &self.layers {
|
||||||
for surface in layer.iter() {
|
for surface in layer.iter() {
|
||||||
surface.compute_position();
|
surface.output_resized();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.global.send_mode();
|
self.global.send_mode();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue