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.cpp34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/multimediawidgets/qvideowidget.cpp b/src/multimediawidgets/qvideowidget.cpp
index a0161c17f..e9977c5a8 100644
--- a/src/multimediawidgets/qvideowidget.cpp
+++ b/src/multimediawidgets/qvideowidget.cpp
@@ -323,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()
@@ -392,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 *)
@@ -427,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) {
@@ -1011,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