diff options
-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(); } |