From a0156be7b6e5f032ff2f8ed6671c00b29ab2ae37 Mon Sep 17 00:00:00 2001 From: tiller Date: Fri, 8 May 2020 20:23:33 +0200 Subject: [PATCH] fixed placement issue on windows when multi-monitor setup --- src/widgets/capture/capturewidget.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 0b7d4dd8..ff95bab9 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -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);