def _on_xdg_activation_v1_request_activate(
        self, _listener: Listener, event: xdg_activation_v1.XdgActivationV1RequestActivateEvent
    ) -> None:
        """Respond to window activate events via the XDG activation V1 protocol."""
        logger.debug("Signal: xdg_activation_v1 request_activate")
        assert self.qtile is not None

        focus_on_window_activation = self.qtile.config.focus_on_window_activation
        if focus_on_window_activation == "never":
            logger.debug("Ignoring focus request (focus_on_window_activation='never')")
            return

        surface = event.surface
        if surface:
            xdg_surface = XdgSurface.try_from_surface(surface)
            if xdg_surface is not None:
                if win := xdg_surface.data:
                    win.handle_activation_request(focus_on_window_activation)
                else:
                    # Shouldn't happen.
                    logger.debug("Failed to find window to activate. Ignoring request.")
Respond to window activate events via the XDG activation V1 protocol.
libqtile/backend/wayland/core.py