diff options
author | Simon Rettberg | 2019-02-28 12:42:07 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-28 12:42:07 +0100 |
commit | 28b4ba76d6d8ff5d08451ce4ccec3aa5bb0230bb (patch) | |
tree | 0cb662d48c1270d84a3cd2ce8efbc659a75382f2 | |
parent | Madness lies down this commit. (diff) | |
download | beamergui-28b4ba76d6d8ff5d08451ce4ccec3aa5bb0230bb.tar.gz beamergui-28b4ba76d6d8ff5d08451ce4ccec3aa5bb0230bb.tar.xz beamergui-28b4ba76d6d8ff5d08451ce4ccec3aa5bb0230bb.zip |
Try harder to get window on top
-rw-r--r-- | src/widget.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index cff1ccd..62953d2 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -195,8 +195,15 @@ Widget::Widget(QWidget *parent) : connect(Bus::inst(), &Bus::serviceConnected, [=](bool isSession) { qDebug() << "\\o/ Received DBus connect notification \\o/"; if (isSession) { // Session bus means user triggered, show immediately - this->show(); - this->raise(); + // Try to be very aggressive to get on top, since we don't want the + // window to hang around behind the full screen VMplayer + setWindowFlag(Qt::WindowStaysOnTopHint, false); + this->hide(); + QTimer::singleShot(10, [=]() { + this->show(); + setWindowFlag(Qt::WindowStaysOnTopHint, true); + this->raise(); + }); } else { // Otherwise, systembus means udev event -- take normal route popupGui(); } |