Skip to content

Commit

Permalink
Merge pull request #171 from mahkoh/jorth/fix-layer-shell-abs-pos
Browse files Browse the repository at this point in the history
tree: fix positioning of layer-shell surfaces
  • Loading branch information
mahkoh authored Apr 20, 2024
2 parents 1566873 + 2b4173f commit 2fe8570
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ifs/wl_surface/zwlr_layer_surface_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 2fe8570

Please sign in to comment.