mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-30 05:43:05 -08:00
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
This commit is contained in:
1 parent
e67cd937a5
commit
da8f7cdceb
1 file changed
+1
-1
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user