From f10747d8904600766ae46817b301a5f590cb42da Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Aug 2005 22:54:45 +0000 Subject: [PATCH] corrected logic in wxQTMediaEvtHandler::OnEraseBackground(): only erase it if there is no movie controller and no movie git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/mediactrl.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index 3f915d4065..e3595c187f 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -4518,23 +4518,27 @@ void wxQTMediaEvtHandler::OnEraseBackground(wxEraseEvent& evt) if ( m_qtb->m_pMC ) { - //repaint movie controller + // repaint movie controller m_pLib.MCDoAction(m_qtb->m_pMC, 2 /*mcActionDraw*/, m_pLib.GetNativeWindowPort(m_hwnd)); } - else if(m_qtb->m_movie) + else // no movie controller { - CGrafPtr port = (CGrafPtr)m_pLib.GetNativeWindowPort(m_hwnd); + if ( m_qtb->m_movie ) + { + CGrafPtr port = (CGrafPtr)m_pLib.GetNativeWindowPort(m_hwnd); - m_pLib.BeginUpdate(port); - m_pLib.UpdateMovie(m_qtb->m_movie); - wxASSERT(m_pLib.GetMoviesError() == noErr); - m_pLib.EndUpdate(port); + m_pLib.BeginUpdate(port); + m_pLib.UpdateMovie(m_qtb->m_movie); + wxASSERT(m_pLib.GetMoviesError() == noErr); + m_pLib.EndUpdate(port); + } + else // no movie + { + // let the system repaint the window + evt.Skip(); + } } - - // VZ: this doesn't make sense: why should we erase the background after - // taking the trouble to do whatever we did above? (FIXME) - evt.Skip(); //repaint with window background (TODO: maybe !m_movie?) } //--------------------------------------------------------------------------- -- 2.45.2