sub-surface: update sub-surface positions if parent does not move
This commit is contained in:
parent
a9bba47449
commit
5a53b74265
1 changed files with 5 additions and 0 deletions
|
|
@ -138,6 +138,9 @@ impl WlSubsurface {
|
|||
if let Some((x, y)) = pending.position.take() {
|
||||
self.position
|
||||
.set(self.surface.buffer_abs_pos.get().at_point(x, y));
|
||||
let (parent_x, parent_y) = self.parent.buffer_abs_pos.get().position();
|
||||
self.surface
|
||||
.set_absolute_position(parent_x + x, parent_y + y);
|
||||
self.parent.need_extents_update.set(true);
|
||||
}
|
||||
Ok(())
|
||||
|
|
@ -172,6 +175,8 @@ impl WlSubsurface {
|
|||
self.surface.set_toplevel(self.parent.toplevel.get());
|
||||
self.surface.ext.set(self.clone());
|
||||
update_children_attach(self)?;
|
||||
let (x, y) = self.parent.buffer_abs_pos.get().position();
|
||||
self.surface.set_absolute_position(x, y);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue