From c5ce417d79602bb001c0ef5098c2f4e99bc10989 Mon Sep 17 00:00:00 2001 From: pokamest Date: Sun, 14 Mar 2021 12:52:19 -0700 Subject: [PATCH] macos close button fix --- client/ui/mainwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/ui/mainwindow.cpp b/client/ui/mainwindow.cpp index 27ce90ef8..ecdac7a96 100644 --- a/client/ui/mainwindow.cpp +++ b/client/ui/mainwindow.cpp @@ -219,8 +219,11 @@ void MainWindow::keyPressEvent(QKeyEvent *event) void MainWindow::closeEvent(QCloseEvent *event) { - event->ignore(); - hide(); + if (currentPage() == Page::Start || currentPage() == Page::NewServer) qApp->quit(); + else { + hide(); + event->ignore(); + } } void MainWindow::showEvent(QShowEvent *event)