pub fn validate_focus_at(&mut self, handle: &WindowHandle<H>) {
        // If the window is already focused do nothing.
        if let Some(current) = self.focus_manager.window(&self.windows) {
            if &current.handle == handle {
                return;
            }
        }
        // Focus the window only if it is also focusable.
        if self
            .windows
            .iter()
            .any(|w| w.can_focus() && &w.handle == handle)
        {
            self.focus_window(handle);
        }
    }
Validates that the given window is focused.
leftwm-core/src/handlers/focus_handler.rs