From 8f75d3d3f69163d90c5bd3d7bfefa589f273617b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 28 Feb 2019 13:00:21 +0100 Subject: Fix it by doing dunnowhat --- src/widget.cpp | 11 ++++++++--- 1 file 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(); -- cgit v1.2.3-55-g7522