This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: qv4l2: fix CaptureWin::setWindowSize() if there are multiple screens
Author:  Hans Verkuil <[email protected]>
Date:    Mon Dec 7 19:15:39 2020 +0100

QGuiApplication::screenAt() can return a nullptr depending on the
screen geometry. It is overly complication since what we want to know
is on which screen the window is shown.

Replace it by querying the window for the screen:

QScreen *screen = window()->windowHandle()->screen();

Signed-off-by: Hans Verkuil <[email protected]>
Reported-by: Mauro Carvalho Chehab <[email protected]>

 utils/qv4l2/capture-win.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=56175f62bef28490aac748ca2edbc5908df928ff
diff --git a/utils/qv4l2/capture-win.cpp b/utils/qv4l2/capture-win.cpp
index 8d9692b5b69a..fad5b8c25607 100644
--- a/utils/qv4l2/capture-win.cpp
+++ b/utils/qv4l2/capture-win.cpp
@@ -29,6 +29,7 @@
 #include <QApplication>
 #include <QDesktopWidget>
 #include <QScreen>
+#include <QWindow>
 
 #include <math.h>
 
@@ -243,7 +244,7 @@ void CaptureWin::setWindowSize(QSize frameSize)
        QDesktopWidget *screen = QApplication::desktop();
        QRect resolution = screen->screenGeometry();
 #else
-       QScreen *screen = QGuiApplication::screenAt(mapToGlobal({width() / 2, 
0}));
+       QScreen *screen = window()->windowHandle()->screen();
        QSize resolution = screen->availableSize();
 #endif
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to