CaptureWidget: define flags outside of the constructor

This commit is contained in:
lupoDharkael
2018-02-03 19:33:26 +01:00
parent 1bc42b0d08
commit e02063f3e0
2 changed files with 12 additions and 14 deletions

View File

@@ -72,7 +72,19 @@ void Controller::createVisualCapture(const uint id, const QString &forcedSavePat
modalWidget->deleteLater();
}
} while (modalWidget);
m_captureWindow = new CaptureWidget(id, forcedSavePath);
#ifdef Q_OS_WIN
setWindowFlags(Qt::WindowStaysOnTopHint
| Qt::FramelessWindowHint
| Qt::Popup);
#else
m_captureWindow->setWindowFlags(Qt::BypassWindowManagerHint
| Qt::WindowStaysOnTopHint
| Qt::FramelessWindowHint
| Qt::Tool);
#endif
m_captureWindow->resize(m_captureWindow->pixmap().size());
connect(m_captureWindow, &CaptureWidget::captureFailed,
this, &Controller::captureFailed);
connect(m_captureWindow, &CaptureWidget::captureTaken,