From a3f2cd96c54eef455d2d531157605fe7b2547ab5 Mon Sep 17 00:00:00 2001 From: silas Date: Sun, 28 Mar 2021 11:06:35 -0500 Subject: [PATCH] Fix OpenRGB not closing --- qt/OpenRGBDialog2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt/OpenRGBDialog2.cpp b/qt/OpenRGBDialog2.cpp index d5af5d621..725308fa0 100644 --- a/qt/OpenRGBDialog2.cpp +++ b/qt/OpenRGBDialog2.cpp @@ -369,7 +369,7 @@ void OpenRGBDialog2::closeEvent(QCloseEvent *event) { ResourceManager::get()->WaitForDeviceDetection(); - if (OpenRGBDialog2::MinimizeToTray) + if (OpenRGBDialog2::MinimizeToTray && !this->isHidden()) { hide(); event->ignore(); @@ -860,7 +860,11 @@ void OpenRGBDialog2::on_Exit() /*-----------------------------------------------*\ | This is the exit from the tray icon | | NOT the main exit button (top right on Windows) | + | | + | The hide is important, otherwise it won't close | + | when minimize on close is enabled | \*-----------------------------------------------*/ + this->hide(); trayIcon->hide(); close(); }