[vlc-devel] commit: Win32: go to fullscreen on the same monitor as the vlc window ( Geoffroy Couprie )
git version control
git at videolan.org
Thu Feb 19 15:34:14 CET 2009
vlc | branch: 0.9-bugfix | Geoffroy Couprie <geo.couprie at gmail.com> | Thu Feb 19 14:14:54 2009 +0100| [616104b4a5f7f503f243933b7a13211d2f54cd9a] | committer: Jean-Baptiste Kempf
Win32: go to fullscreen on the same monitor as the vlc window
Fixes #2517
(cherry picked from commit 5568c88e76b8f016756ee8349190b96dd94f345b)
Signed-off-by: Jean-Baptiste Kempf <jb at sasmira.jbkempf.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=616104b4a5f7f503f243933b7a13211d2f54cd9a
---
modules/video_output/msw/events.c | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index f219e8b..2342797 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -1149,15 +1149,6 @@ static WINDOWPLACEMENT getWindowState(HWND hwnd)
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 void ControlParentWindow( vout_thread_t *p_vout, int i_query, ... )
{
@@ -1203,9 +1194,11 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
mi.rcMonitor.bottom - mi.rcMonitor.top,
SWP_NOZORDER|SWP_FRAMECHANGED );
}
-
- /* Maximize window */
- SetWindowState( hwnd, SW_SHOWMAXIMIZED, window_placement );
+ else
+ {
+ /* Maximize non embedded window */
+ ShowWindow( hwnd, SW_SHOWMAXIMIZED );
+ }
if( p_vout->p_sys->hparent )
{
@@ -1233,9 +1226,6 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
/* 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;
@@ -1254,6 +1244,12 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
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 );
More information about the vlc-devel
mailing list