summaryrefslogtreecommitdiffstats
path: root/src/pwgui/pwgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pwgui/pwgui.cpp')
-rw-r--r--src/pwgui/pwgui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pwgui/pwgui.cpp b/src/pwgui/pwgui.cpp
index 193341b..b6130f0 100644
--- a/src/pwgui/pwgui.cpp
+++ b/src/pwgui/pwgui.cpp
@@ -29,6 +29,9 @@ PwGui::~PwGui()
void PwGui::initializeUI(char *user)
{
ui->setupUi(this);
+ this->setWindowModality(Qt::ApplicationModal);
+ // Put always on top
+ this->setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint);
// Prefill username
if (user != NULL) {
@@ -41,8 +44,6 @@ void PwGui::initializeUI(char *user)
/* Main Window properties */
- // Disable close button
- this->setWindowFlags((this->windowFlags() & ~Qt::WindowCloseButtonHint) | Qt::WindowStaysOnTopHint);
// center dialog on screen center
QRect desktopRect = QApplication::desktop()->screenGeometry(this);
this->move( desktopRect.width()/2-this->width()/2,