Commit 2c98e728 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows: save size of video window when in non-autosize mode.

parent fb9552b7
...@@ -126,10 +126,14 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ): ...@@ -126,10 +126,14 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
wxSize child_size = wxSize(0,0); wxSize child_size = wxSize(0,0);
if( !b_auto_size ) if( !b_auto_size )
{ {
WindowSettings *ws = p_intf->p_sys->p_window_settings;
wxPoint p; bool b_shown;
// Maybe this size should be an option // Maybe this size should be an option
child_size = wxSize( wxSystemSettings::GetMetric(wxSYS_SCREEN_X) / 2, child_size = wxSize( wxSystemSettings::GetMetric(wxSYS_SCREEN_X) / 2,
wxSystemSettings::GetMetric(wxSYS_SCREEN_Y) / 2 ); wxSystemSettings::GetMetric(wxSYS_SCREEN_Y) / 2 );
ws->GetSettings( WindowSettings::ID_VIDEO, b_shown, p, child_size );
SetSize( child_size ); SetSize( child_size );
} }
...@@ -167,6 +171,15 @@ VideoWindow::~VideoWindow() ...@@ -167,6 +171,15 @@ VideoWindow::~VideoWindow()
p_intf->pf_control_window = NULL; p_intf->pf_control_window = NULL;
vlc_mutex_unlock( &lock ); vlc_mutex_unlock( &lock );
#ifdef WIN32
if( !b_auto_size )
{
WindowSettings *ws = p_intf->p_sys->p_window_settings;
ws->SetSettings( WindowSettings::ID_VIDEO, true,
GetPosition(), GetSize() );
}
#endif
vlc_mutex_destroy( &lock ); vlc_mutex_destroy( &lock );
} }
......
...@@ -1068,6 +1068,7 @@ public: ...@@ -1068,6 +1068,7 @@ public:
ID_MESSAGES, ID_MESSAGES,
ID_FILE_INFO, ID_FILE_INFO,
ID_BOOKMARKS, ID_BOOKMARKS,
ID_VIDEO,
ID_MAX, ID_MAX,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment