From 34b666f602f0debdf87424a1340afda73cde04eb Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Thu, 26 Mar 2026 09:48:35 -0500 Subject: [PATCH 1/2] Fix ghost window on Windows by using proper dialog window flags Replace Qt::Window with Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint in UpdateCheckDialog to prevent an orphaned DWM window frame on Windows 11. Using bare Qt::Window on a QDialog causes Windows DWM to create an independently managed top-level composition surface. If the dialog's native handle is not cleanly destroyed (e.g., during process exit while the dialog exists), DWM can leave behind a transparent, non-interactive ghost window frame that persists even after the process is gone and can only be cleared by rebooting. Using Qt::Dialog keeps the dialog properly associated with its parent window in DWM's composition tree, preventing the orphaned frame. Fixes #9493 --- src/gui/UpdateCheckDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/UpdateCheckDialog.cpp b/src/gui/UpdateCheckDialog.cpp index 6d7015f73f..e7a9e343a7 100644 --- a/src/gui/UpdateCheckDialog.cpp +++ b/src/gui/UpdateCheckDialog.cpp @@ -29,7 +29,7 @@ UpdateCheckDialog::UpdateCheckDialog(QWidget* parent) , m_ui(new Ui::UpdateCheckDialog()) { m_ui->setupUi(this); - setWindowFlags(Qt::Window); + setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); setAttribute(Qt::WA_DeleteOnClose); m_ui->iconLabel->setPixmap(icons()->applicationIcon().pixmap(48)); From a84fccc012e9adb1e487cd33e9076242760f1315 Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Thu, 26 Mar 2026 10:34:36 -0500 Subject: [PATCH 2/2] Fix indentation of setWindowFlags line --- src/gui/UpdateCheckDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/UpdateCheckDialog.cpp b/src/gui/UpdateCheckDialog.cpp index e7a9e343a7..9e3d871497 100644 --- a/src/gui/UpdateCheckDialog.cpp +++ b/src/gui/UpdateCheckDialog.cpp @@ -29,7 +29,7 @@ UpdateCheckDialog::UpdateCheckDialog(QWidget* parent) , m_ui(new Ui::UpdateCheckDialog()) { m_ui->setupUi(this); - setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); + setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); setAttribute(Qt::WA_DeleteOnClose); m_ui->iconLabel->setPixmap(icons()->applicationIcon().pixmap(48));