]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/video.cpp: only set background color when necessary.
authorGildas Bazin <gbazin@videolan.org>
Fri, 15 Apr 2005 10:30:56 +0000 (10:30 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 15 Apr 2005 10:30:56 +0000 (10:30 +0000)
modules/gui/wxwindows/video.cpp

index db13ec4457a3284f9d2f9817e50ca285e8cf82ce..078768ef089d9c2896a0912568ad8cff8ed84861 100644 (file)
@@ -139,9 +139,6 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
     Show();
     b_shown = VLC_TRUE;
 
-    p_child_window->SetBackgroundColour( *wxBLACK );
-    SetBackgroundColour( *wxBLACK );
-
     p_intf->p_sys->p_video_sizer = new wxBoxSizer( wxHORIZONTAL );
     p_intf->p_sys->p_video_sizer->Add( this, 1, wxEXPAND );
 
@@ -219,6 +216,10 @@ void *VideoWindow::GetWindow( vout_thread_t *_p_vout,
     AddPendingEvent( event );
     vlc_mutex_unlock( &lock );
 
+    p_child_window->SetBackgroundColour( *wxBLACK );
+    SetBackgroundColour( *wxBLACK );
+    Refresh();
+
 #ifdef __WXGTK__
     GtkWidget *p_widget = p_child_window->GetHandle();
 
@@ -302,6 +303,10 @@ void VideoWindow::OnHideTimer( wxTimerEvent& WXUNUSED(event))
 
     wxCommandEvent intf_event( wxEVT_INTF, 0 );
     p_parent->AddPendingEvent( intf_event );
+
+    p_child_window->SetBackgroundColour( wxNullColour );
+    SetBackgroundColour( wxNullColour );
+    Refresh();
 }
 
 void VideoWindow::OnControlEvent( wxCommandEvent &event )