From 92b7ae98b8795ba167eb4c8d9e1b3718e6fc27cb Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Wed, 10 Nov 2004 10:59:16 +0000 Subject: [PATCH] * modules/video_output/directx: in embedded mode, we now use the current monitor when switching to fullscreen. --- modules/video_output/directx/directx.c | 14 ++++++++++++++ modules/video_output/directx/glwin32.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/modules/video_output/directx/directx.c b/modules/video_output/directx/directx.c index 2ad441c22f..032851cc5e 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 aff358e3d5..8f6a54628e 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 ); -- GitLab