def check_stacking(self, win: base.Window) -> None:
        """Triggers restacking if a fullscreen window loses focus."""
        if win is self.last_focused:
            return

        if self.last_focused and self.last_focused.fullscreen:
            self.last_focused.change_layer()

        self.last_focused = win
Triggers restacking if a fullscreen window loses focus.
libqtile/backend/x11/core.py