fixed placement issue on windows when multi-monitor setup

This commit is contained in:
tiller
2020-05-08 20:23:33 +02:00
committed by borgmanJeremy
parent e1c6da3f94
commit a0156be7b6

View File

@@ -104,9 +104,12 @@ CaptureWidget::CaptureWidget(const uint id,
for (QScreen* const screen : QGuiApplication::screens()) {
QPoint topLeftScreen = screen->geometry().topLeft();
if (topLeft.x() > topLeftScreen.x() ||
topLeft.y() > topLeftScreen.y()) {
topLeft = topLeftScreen;
if (topLeftScreen.x() < topLeft.x()) {
topLeft.setX(topLeftScreen.x());
}
if (topLeftScreen.y() < topLeft.y()) {
topLeft.setY(topLeftScreen.y());
}
}
move(topLeft);