fn show_scratchpad<H: Handle, C: Config, SERVER: DisplayServer<H>>(
    manager: &mut Manager<H, C, SERVER>,
    scratchpad_window: &WindowHandle<H>,
) -> Result<(), &'static str> {
    tracing::trace!("Show scratchpad window {:?}", scratchpad_window);
    let current_tag = &manager
        .state
        .focus_manager
        .tag(0)
        .ok_or("Could not retrieve the current tag")?;
    let window = manager
        .state
        .windows
        .iter_mut()
        .find(|w| w.handle == *scratchpad_window)
        .ok_or("Could not find window from scratchpad_window")?;
    let previous_tag = window.tag;
    window.untag();

    // Remove the entry for the previous tag to prevent the scratchpad being
    // refocused.
    if let Some(previous_tag) = previous_tag {
        manager
            .state
            .focus_manager
            .tags_last_window
            .remove(&previous_tag);
    }
    // Show the scratchpad.
    window.tag(current_tag);
    window.set_visible(true);

    // Send tag changement to X
    let act = DisplayAction::SetWindowTag(*scratchpad_window, window.tag);
    manager.state.actions.push_back(act);
    manager.state.sort_windows();
    manager
        .state
        .handle_single_border(manager.config.border_width());
    manager.state.handle_window_focus(scratchpad_window);
    manager.state.move_to_top(scratchpad_window);

    Ok(())
}
Makes a scratchpad window visible:
Expects that the window handle is a valid handle to an invisible scratchpad window
leftwm-core/src/handlers/command_handler/scratchpad_handler.rs