pub fn update_window_focus_state(&mut self, is_focused: bool) {
        let mut state = self.state.lock().unwrap();
        match &mut *state {
            AdapterState::Inactive {
                is_window_focused, ..
            } => {
                *is_window_focused = is_focused;
            }
            AdapterState::Pending {
                is_window_focused, ..
            } => {
                *is_window_focused = is_focused;
            }
            AdapterState::Active(r#impl) => r#impl.update_window_focus_state(is_focused),
        }
    }
Update the tree state based on whether the window is focused.
platforms/unix/src/adapter.rs