diff --git a/modules/video_output/directx/directx.c b/modules/video_output/directx/directx.c index 2ad441c22ff58098e1105b6c40a75ae4ae9d24a5..032851cc5ef0dfea5cddd1e26e02687898d25216 100644 --- a/modules/video_output/directx/directx.c +++ b/modules/video_output/directx/directx.c @@ -556,6 +556,20 @@ static int Manage( vout_thread_t *p_vout ) int i_style = WS_CLIPCHILDREN | WS_VISIBLE; SetWindowLong( hwnd, GWL_STYLE, i_style ); + if( p_vout->p_sys->hparent ) + { + /* Retrieve current window position so fullscreen will happen + * on the right screen */ + POINT point = {0,0}; + RECT rect; + ClientToScreen( p_vout->p_sys->hwnd, &point ); + GetClientRect( p_vout->p_sys->hwnd, &rect ); + SetWindowPos( hwnd, 0, point.x, point.y, + rect.right, rect.bottom, + SWP_NOZORDER|SWP_FRAMECHANGED ); + GetWindowPlacement( hwnd, &window_placement ); + } + /* Maximize window */ window_placement.showCmd = SW_SHOWMAXIMIZED; SetWindowPlacement( hwnd, &window_placement ); diff --git a/modules/video_output/directx/glwin32.c b/modules/video_output/directx/glwin32.c index aff358e3d5c3c09f099dd960fe1de16edb606802..8f6a54628e6a9011e79b0bdbf16c467f57e2e521 100644 --- a/modules/video_output/directx/glwin32.c +++ b/modules/video_output/directx/glwin32.c @@ -322,6 +322,20 @@ static int Manage( vout_thread_t *p_vout ) int i_style = WS_CLIPCHILDREN | WS_VISIBLE; SetWindowLong( hwnd, GWL_STYLE, i_style ); + if( p_vout->p_sys->hparent ) + { + /* Retrieve current window position so fullscreen will happen + * on the right screen */ + POINT point = {0,0}; + RECT rect; + ClientToScreen( p_vout->p_sys->hwnd, &point ); + GetClientRect( p_vout->p_sys->hwnd, &rect ); + SetWindowPos( hwnd, 0, point.x, point.y, + rect.right, rect.bottom, + SWP_NOZORDER|SWP_FRAMECHANGED ); + GetWindowPlacement( hwnd, &window_placement ); + } + /* Maximize window */ window_placement.showCmd = SW_SHOWMAXIMIZED; SetWindowPlacement( hwnd, &window_placement );