summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-28 13:00:21 +0100
committerSimon Rettberg2019-02-28 13:00:21 +0100
commit8f75d3d3f69163d90c5bd3d7bfefa589f273617b (patch)
tree1b5af7c28073d7c04dad5a57d754cd84a85f513e
parentTry harder to get window on top (diff)
downloadbeamergui-8f75d3d3f69163d90c5bd3d7bfefa589f273617b.tar.gz
beamergui-8f75d3d3f69163d90c5bd3d7bfefa589f273617b.tar.xz
beamergui-8f75d3d3f69163d90c5bd3d7bfefa589f273617b.zip
Fix it by doing dunnowhat
-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();