summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-03-23 17:28:15 +0100
committerLars Knoll <lars.knoll@qt.io>2021-04-06 08:12:14 +0000
commit1dd3f82348b790aba9eaca6e37ee07702a20a3c8 (patch)
tree8116fbd04f2a595009efa39c311f95a150b5e7e8 /src
parent02a837e71919642afac08478f6aee1eafdb94aaa (diff)
Correctly set the target rect when going fullscreen
This didn't show on the other platforms that used native mechanisms to determine the window size, but is required for this to work correctly on Windows. Change-Id: I20bbb12dcfddd56bd6c1684a69ee836807e0b679 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/multimediawidgets/qvideowidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/multimediawidgets/qvideowidget.cpp b/src/multimediawidgets/qvideowidget.cpp
index 0cf449faf..e7b20a76d 100644
--- a/src/multimediawidgets/qvideowidget.cpp
+++ b/src/multimediawidgets/qvideowidget.cpp
@@ -347,6 +347,7 @@ bool QVideoWidget::event(QEvent *event)
if (event->type() == QEvent::WindowStateChange) {
if (windowState() & Qt::WindowFullScreen) {
d->videoSink->setFullScreen(true);
+ d->videoSink->setTargetRect(QRectF(0, 0, window()->width(), window()->height()));
if (!d->wasFullScreen)
emit fullScreenChanged(d->wasFullScreen = true);