def _output_manager_reconfigure(self, config: OutputConfigurationV1, apply: bool) -> None:
        """
        See if an output configuration would be accepted by the backend, and apply it if
        desired.
        """
        ok = True

        for head in config.heads:
            head_state = head.state
            wlr_output = head_state.output

            state = OutputState()
            state.set_enabled(head_state.enabled)

            if head_state.enabled:
                if head_state.mode:
                    state.set_mode(head_state.mode)
                else:
                    state.set_custom_mode(head_state.custom_mode)

                state.set_transform(head_state.transform)
                state.set_scale(head_state.scale)
                state.set_adaptive_sync_enabled(head_state.adaptive_sync_enabled)
                # Rescale the cursor if necessary
                box = self.output_layout.get_box(wlr_output)
                if box.x != head_state.x or box.y != head_state.y:
                    self.output_layout.add(wlr_output, head_state.x, head_state.y)
                # Ensure we have cursors loaded for the new scale factor.
                self._cursor_manager.load(head_state.scale)
                if not self.seat.pointer_state.focused_surface:
                    self.cursor.set_xcursor(self._cursor_manager, "default")

            if apply:
                ok = ok and wlr_output.commit(state)
            else:
                ok = ok and wlr_output.test(state)
            state.finish()

        if ok:
            config.send_succeeded()
        else:
            config.send_failed()
        config.destroy()
        if apply:
            self._on_output_layout_change()

        See if an output configuration would be accepted by the backend, and apply it if
        desired.
        
libqtile/backend/wayland/core.py