summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widget.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 62953d2..12bbfd1 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -147,7 +147,11 @@ Widget::Widget(QWidget *parent) :
ret.revert();
}
} else { // Screen count decreased - pop up GUI and don't just deconfig the screen
+ setWindowFlag(Qt::WindowStaysOnTopHint, false);
this->show();
+ setWindowFlag(Qt::WindowStaysOnTopHint, true);
+ this->raise();
+ this->showNormal();
}
} else {
// GUI currently visible -- highlight refresh button
@@ -199,10 +203,11 @@ Widget::Widget(QWidget *parent) :
// window to hang around behind the full screen VMplayer
setWindowFlag(Qt::WindowStaysOnTopHint, false);
this->hide();
- QTimer::singleShot(10, [=]() {
- this->show();
- setWindowFlag(Qt::WindowStaysOnTopHint, true);
+ QTimer::singleShot(100, [=]() {
+ this->showNormal();
+ this->setWindowFlag(Qt::WindowStaysOnTopHint, true);
this->raise();
+ this->show();
});
} else { // Otherwise, systembus means udev event -- take normal route
popupGui();