pub fn window_changed_handler(&mut self, change: WindowChange<H>) -> bool {
        let mut changed = false;
        let mut fullscreen_changed = false;
        let mut above_changed = false;
        let strut_changed = change.strut.is_some();
        let windows = self.state.windows.clone();
        if let Some(window) = self
            .state
            .windows
            .iter_mut()
            .find(|w| w.handle == change.handle)
        {
            if let Some(states) = &change.states {
                fullscreen_changed =
                    states.contains(&WindowState::Fullscreen) != window.is_fullscreen();
                above_changed = states.contains(&WindowState::Above)
                    != window.states.contains(&WindowState::Above);
            }
            let container = match find_transient_parent(&windows, window.transient) {
                Some(parent) => Some(parent.exact_xyhw()),
                None if window.r#type == WindowType::Dialog => self
                    .state
                    .workspaces
                    .iter()
                    .find(|ws| ws.tag == window.tag)
                    .map(|ws| ws.xyhw),
                _ => None,
            };

            changed = change.update(window, container);
            if window.r#type == WindowType::Dock {
                update_workspace_avoid_list(&mut self.state);
                // Don't let changes from docks re-render the worker. This will result in an
                // infinite loop. Just be patient a rerender will occur.
            }
        }
        if fullscreen_changed {
            // Update `dock` windows once, so they can recieve mouse click events again.
            // This is necessary, since we exclude them from the general update loop above.
            if let Some(windows) = self
                .state
                .windows
                .iter()
                .find(|w| w.r#type == WindowType::Dock)
            {
                self.display_server.update_windows(vec![windows]);
            }
        }

        if fullscreen_changed || above_changed {
            // Reorder windows.
            self.state.sort_windows();
        }
        if strut_changed {
            self.state.update_static();
        }
        changed
    }
`window_changed_handler` is called when the display server sends
the `DisplayEvent::WindowChange(change)` event.

Returns true if changes need to be rendered.
leftwm-core/src/handlers/window_handler.rs