From aedc45abd508cde810b4924eb2a7dd1123965a8f Mon Sep 17 00:00:00 2001 From: Reza Jelveh Date: Sat, 29 Aug 2020 20:47:26 +0800 Subject: [PATCH] The Database Open Dialog should use the window flag QT::Dialog Currently the Open Dialog does not behave like a dialog. In Unix it means that the EWHM hints are not set correctly therefore the window manager doesn't properly set the floating window style. It should also allow removing Mac/Windows/Unix custom conditional code. --- src/gui/DatabaseOpenDialog.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gui/DatabaseOpenDialog.cpp b/src/gui/DatabaseOpenDialog.cpp index 5e6e41b7a..e7194b7e2 100644 --- a/src/gui/DatabaseOpenDialog.cpp +++ b/src/gui/DatabaseOpenDialog.cpp @@ -25,11 +25,7 @@ DatabaseOpenDialog::DatabaseOpenDialog(QWidget* parent) , m_view(new DatabaseOpenWidget(this)) { setWindowTitle(tr("Unlock Database - KeePassXC")); -#ifdef Q_OS_MACOS - setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); -#else - setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::ForeignWindow); -#endif + setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint); connect(m_view, SIGNAL(dialogFinished(bool)), this, SLOT(complete(bool))); auto* layout = new QVBoxLayout(); layout->setMargin(0);