The term "Debug Window" is not accurate IMO and we should consider renaming it to a more user-friendly term (only visible in the window title as well as from the tray menu).
{
#ifndef Q_OS_MAC 
    if(clientModel && clientModel->getOptionsModel())
    {
        if(!clientModel->getOptionsModel()->getMinimizeOnClose())
        {
            
            rpcConsole->close();
            QApplication::quit();
        }
        else
        {
            QMainWindow::showMinimized();
            event->ignore();
        }
    }
#else
    QMainWindow::closeEvent(event);
#endif
}
void BitcoinGUI::showEvent(QShowEvent *event)