From da8f7cdceb03ff12cb837837d4f0de289ef94715 Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Thu, 16 Apr 2026 07:27:07 -0500 Subject: [PATCH] Fix ghost window on Windows by using proper dialog window flags (#13201) * 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 6d7015f73..9e3d87149 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));