return window_placement;
}
-/* Internal wrapper over SetWindowPlacement */
-static void SetWindowState(HWND hwnd, int nShowCmd,WINDOWPLACEMENT window_placement)
-{
- window_placement.showCmd = nShowCmd;
- SetWindowPlacement( hwnd, &window_placement );
- SetWindowPos( hwnd, 0, 0, 0, 0, 0,
- SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED);
-}
-
/* Internal wrapper to call vout_ControlWindow for hparent */
static int vaControlParentWindow( vout_thread_t *p_vout, int i_query,
va_list args )
SWP_NOZORDER|SWP_FRAMECHANGED );
#endif
}
-
- /* Maximize window */
- SetWindowState( hwnd, SW_SHOWMAXIMIZED, window_placement );
+ else
+ {
+ /* Maximize non embedded window */
+ ShowWindow( hwnd, SW_SHOWMAXIMIZED );
+ }
if( p_vout->p_sys->hparent )
{
/* Change window style, no borders and no title bar */
SetWindowLong( hwnd, GWL_STYLE, p_vout->p_sys->i_window_style );
- /* Normal window */
- SetWindowState( hwnd, SW_SHOWNORMAL, window_placement );
-
if( p_vout->p_sys->hparent )
{
RECT rect;
SetForegroundWindow( p_vout->p_sys->hparent );
ShowWindow( hwnd, SW_HIDE );
}
+ else
+ {
+ /* return to normal window for non embedded vout */
+ SetWindowPlacement( hwnd, &window_placement );
+ ShowWindow( hwnd, SW_SHOWNORMAL );
+ }
/* Make sure the mouse cursor is displayed */
PostMessage( p_vout->p_sys->hwnd, WM_VLC_SHOW_MOUSE, 0, 0 );