rect_window.bottom = va_arg( args, unsigned int );
if( !rect_window.right ) rect_window.right = p_vout->i_window_width;
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,
rect_window.right - rect_window.left,
{
msg_Dbg( p_vout, "leaving fullscreen mode" );
/* 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 )
{
/* Title */
char *psz_title;
+ int i_window_style;
/* */
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 long FAR PASCAL DirectXEventProc( HWND, UINT, WPARAM, LPARAM );
/* Create a window for the video */
/* Creating a window under Windows also initializes the thread's event
* message queue */
- if( DirectXCreateWindow( p_event->p_vout ) )
+ if( DirectXCreateWindow( p_event ) )
p_event->b_error = true;
p_event->b_ready = true;
* the video will be displayed. This window will also allow us to capture the
* 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;
HMENU hMenu;
RECT rect_window;
i_stylex = 0;
}
- p_vout->p_sys->i_window_style = i_style;
+ p_event->i_window_style = i_style;
/* Create the window */
p_vout->p_sys->hwnd =
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 )
{
void EventThreadMouseAutoHide( event_thread_t * );
void EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
unsigned EventThreadRetreiveChanges( event_thread_t * );
-
+int EventThreadGetWindowStyle( event_thread_t * );
int i_window_y;
int i_window_width;
int i_window_height;
- int i_window_style;
volatile uint16_t i_changes; /* changes made to the video display */