Fix refresh_focus

This commit is contained in:
Darksome 2023-04-01 20:35:58 +04:00
parent 32805d8ee0
commit a11c3e8f67
5 changed files with 35 additions and 3 deletions

View file

@ -132,6 +132,14 @@ impl CosmicMapped {
}
}
pub fn has_active_window(&self, window: &CosmicSurface) -> bool {
match &self.element {
CosmicMappedInternal::Stack(stack) => stack.has_active(window),
CosmicMappedInternal::Window(win) => win.contains_surface(window),
_ => unreachable!(),
}
}
pub fn active_window_offset(&self) -> Point<i32, Logical> {
match &self.element {
CosmicMappedInternal::Stack(stack) => stack.offset(),