Skip to content

Commit 15290b0

Browse files
authored
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
1 parent 379be00 commit 15290b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/UpdateCheckDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ UpdateCheckDialog::UpdateCheckDialog(QWidget* parent)
2929
, m_ui(new Ui::UpdateCheckDialog())
3030
{
3131
m_ui->setupUi(this);
32-
setWindowFlags(Qt::Window);
32+
setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
3333
setAttribute(Qt::WA_DeleteOnClose);
3434

3535
m_ui->iconLabel->setPixmap(icons()->applicationIcon().pixmap(48));

0 commit comments

Comments
 (0)