shell: Fix render positions for global workspace mode

This commit is contained in:
Victoria Brekenfeld 2022-11-22 19:52:13 +01:00
parent c25f2ed447
commit 4a9afd0572
3 changed files with 21 additions and 23 deletions

View file

@ -903,20 +903,6 @@ impl Shell {
}
}
pub fn map_space_to_global<C: smithay::utils::Coordinate>(
&self,
space_loc: impl Into<Point<C, Logical>>,
output: &Output,
) -> Point<C, Logical> {
match self.workspaces {
WorkspaceMode::Global(_) => space_loc.into(),
WorkspaceMode::OutputBound(_, _) => {
let p = space_loc.into().to_f64() + output.current_location().to_f64();
(C::from_f64(p.x), C::from_f64(p.y)).into()
}
}
}
pub fn refresh(&mut self) {
self.popups.cleanup();