summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets/qvideowidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimediawidgets/qvideowidget.cpp')
-rw-r--r--src/multimediawidgets/qvideowidget.cpp38
1 files changed, 8 insertions, 30 deletions
diff --git a/src/multimediawidgets/qvideowidget.cpp b/src/multimediawidgets/qvideowidget.cpp
index 9a01c73aa..e9977c5a8 100644
--- a/src/multimediawidgets/qvideowidget.cpp
+++ b/src/multimediawidgets/qvideowidget.cpp
@@ -76,7 +76,9 @@ QVideoWidgetControlBackend::QVideoWidgetControlBackend(
layout->setMargin(0);
layout->setSpacing(0);
- layout->addWidget(control->videoWidget());
+ QWidget *videoWidget = control->videoWidget();
+ videoWidget->setMouseTracking(widget->hasMouseTracking());
+ layout->addWidget(videoWidget);
widget->setLayout(layout);
}
@@ -321,6 +323,9 @@ QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(
connect(control, SIGNAL(nativeSizeChanged()), m_widget, SLOT(_q_dimensionsChanged()));
control->setWinId(widget->winId());
+#if defined(Q_OS_WIN)
+ m_widget->setUpdatesEnabled(false);
+#endif
}
QWindowVideoWidgetBackend::~QWindowVideoWidgetBackend()
@@ -390,16 +395,13 @@ void QWindowVideoWidgetBackend::showEvent()
m_windowControl->setWinId(m_widget->winId());
updateDisplayRect();
-#if defined(Q_WS_WIN)
- m_widget->setUpdatesEnabled(false);
+#if defined(Q_OS_WIN)
+ m_windowControl->repaint();
#endif
}
void QWindowVideoWidgetBackend::hideEvent(QHideEvent *)
{
-#if defined(Q_WS_WIN)
- m_widget->setUpdatesEnabled(true);
-#endif
}
void QWindowVideoWidgetBackend::moveEvent(QMoveEvent *)
@@ -425,16 +427,6 @@ void QWindowVideoWidgetBackend::paintEvent(QPaintEvent *event)
event->accept();
}
-#if defined(Q_WS_WIN)
-bool QWindowVideoWidgetBackend::winEvent(MSG *message, long *)
-{
- if (message->message == WM_PAINT)
- m_windowControl->repaint();
-
- return false;
-}
-#endif
-
void QVideoWidgetPrivate::setCurrentControl(QVideoWidgetControlInterface *control)
{
if (currentControl != control) {
@@ -1009,20 +1001,6 @@ void QVideoWidget::paintEvent(QPaintEvent *event)
}
}
-
-#if defined(Q_WS_WIN)
-/*!
- \internal
-*/
-bool QVideoWidget::winEvent(MSG *message, long *result)
-{
- return d_func()->windowBackend && d_func()->windowBackend->winEvent(message, result)
- ? true
- : QWidget::winEvent(message, result);
-}
-#endif
-
-
#include "moc_qvideowidget.cpp"
#include "moc_qvideowidget_p.cpp"
QT_END_NAMESPACE