Commit 98ed98bb authored by Laurent Aimar's avatar Laurent Aimar

Privatized i_window_style in msw.

parent fce7510d
...@@ -507,7 +507,7 @@ int Control( vout_thread_t *p_vout, int i_query, va_list args ) ...@@ -507,7 +507,7 @@ int Control( vout_thread_t *p_vout, int i_query, va_list args )
rect_window.bottom = va_arg( args, unsigned int ); rect_window.bottom = va_arg( args, unsigned int );
if( !rect_window.right ) rect_window.right = p_vout->i_window_width; if( !rect_window.right ) rect_window.right = p_vout->i_window_width;
if( !rect_window.bottom ) rect_window.bottom = p_vout->i_window_height; if( !rect_window.bottom ) rect_window.bottom = p_vout->i_window_height;
AdjustWindowRect( &rect_window, p_vout->p_sys->i_window_style, 0 ); AdjustWindowRect( &rect_window, EventThreadGetWindowStyle( p_vout->p_sys->p_event ), 0 );
SetWindowPos( p_vout->p_sys->hwnd, 0, 0, 0, SetWindowPos( p_vout->p_sys->hwnd, 0, 0, 0,
rect_window.right - rect_window.left, rect_window.right - rect_window.left,
...@@ -658,7 +658,7 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout ) ...@@ -658,7 +658,7 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
{ {
msg_Dbg( p_vout, "leaving fullscreen mode" ); msg_Dbg( p_vout, "leaving fullscreen mode" );
/* Change window style, no borders and no title bar */ /* Change window style, no borders and no title bar */
SetWindowLong( hwnd, GWL_STYLE, p_vout->p_sys->i_window_style ); SetWindowLong( hwnd, GWL_STYLE, EventThreadGetWindowStyle( p_vout->p_sys->p_event ) );
if( p_vout->p_sys->hparent ) if( p_vout->p_sys->hparent )
{ {
......
...@@ -95,13 +95,14 @@ struct event_thread_t ...@@ -95,13 +95,14 @@ struct event_thread_t
/* Title */ /* Title */
char *psz_title; char *psz_title;
int i_window_style;
/* */ /* */
unsigned i_changes; unsigned i_changes;
}; };
static int DirectXCreateWindow( vout_thread_t *p_vout ); static int DirectXCreateWindow( event_thread_t * );
static void DirectXCloseWindow ( vout_thread_t *p_vout ); static void DirectXCloseWindow ( vout_thread_t *p_vout );
static long FAR PASCAL DirectXEventProc( HWND, UINT, WPARAM, LPARAM ); static long FAR PASCAL DirectXEventProc( HWND, UINT, WPARAM, LPARAM );
...@@ -137,7 +138,7 @@ static void *EventThread( void *p_this ) ...@@ -137,7 +138,7 @@ static void *EventThread( void *p_this )
/* Create a window for the video */ /* Create a window for the video */
/* Creating a window under Windows also initializes the thread's event /* Creating a window under Windows also initializes the thread's event
* message queue */ * message queue */
if( DirectXCreateWindow( p_event->p_vout ) ) if( DirectXCreateWindow( p_event ) )
p_event->b_error = true; p_event->b_error = true;
p_event->b_ready = true; p_event->b_ready = true;
...@@ -416,8 +417,9 @@ static void *EventThread( void *p_this ) ...@@ -416,8 +417,9 @@ static void *EventThread( void *p_this )
* the video will be displayed. This window will also allow us to capture the * the video will be displayed. This window will also allow us to capture the
* events. * events.
*****************************************************************************/ *****************************************************************************/
static int DirectXCreateWindow( vout_thread_t *p_vout ) static int DirectXCreateWindow( event_thread_t *p_event )
{ {
vout_thread_t *p_vout = p_event->p_vout;
HINSTANCE hInstance; HINSTANCE hInstance;
HMENU hMenu; HMENU hMenu;
RECT rect_window; RECT rect_window;
...@@ -545,7 +547,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) ...@@ -545,7 +547,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
i_stylex = 0; i_stylex = 0;
} }
p_vout->p_sys->i_window_style = i_style; p_event->i_window_style = i_style;
/* Create the window */ /* Create the window */
p_vout->p_sys->hwnd = p_vout->p_sys->hwnd =
...@@ -947,6 +949,11 @@ unsigned EventThreadRetreiveChanges( event_thread_t *p_event ) ...@@ -947,6 +949,11 @@ unsigned EventThreadRetreiveChanges( event_thread_t *p_event )
return i_changes; return i_changes;
} }
int EventThreadGetWindowStyle( event_thread_t *p_event )
{
/* No need to lock, it is serialized by EventThreadStart */
return p_event->i_window_style;
}
event_thread_t *EventThreadCreate( vout_thread_t *p_vout ) event_thread_t *EventThreadCreate( vout_thread_t *p_vout )
{ {
......
...@@ -35,4 +35,4 @@ void EventThreadStop( event_thread_t * ); ...@@ -35,4 +35,4 @@ void EventThreadStop( event_thread_t * );
void EventThreadMouseAutoHide( event_thread_t * ); void EventThreadMouseAutoHide( event_thread_t * );
void EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback ); void EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
unsigned EventThreadRetreiveChanges( event_thread_t * ); unsigned EventThreadRetreiveChanges( event_thread_t * );
int EventThreadGetWindowStyle( event_thread_t * );
...@@ -95,7 +95,6 @@ struct vout_sys_t ...@@ -95,7 +95,6 @@ struct vout_sys_t
int i_window_y; int i_window_y;
int i_window_width; int i_window_width;
int i_window_height; int i_window_height;
int i_window_style;
volatile uint16_t i_changes; /* changes made to the video display */ volatile uint16_t i_changes; /* changes made to the video display */
......
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