From: RĂ©mi Denis-Courmont Date: Wed, 4 Mar 2009 17:36:33 +0000 (+0200) Subject: Remove unused VOUT_PARENT X-Git-Tag: 1.0.0-pre1~318 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=677088de789c3a1ed70250f1c28686749520b064;p=vlc Remove unused VOUT_PARENT By the way: - the OSX implementation seemed buggy w.r.t. fullscreen, - the X11 implementation seemed buggy w.r.t. both vout_window and events, - the OMAPFB implementation was bogus. --- diff --git a/include/vlc_vout.h b/include/vlc_vout.h index 059ffea33b..c322288805 100644 --- a/include/vlc_vout.h +++ b/include/vlc_vout.h @@ -707,7 +707,6 @@ enum output_query_e { VOUT_SET_SIZE, /* arg1= unsigned int, arg2= unsigned int, res= */ VOUT_SET_STAY_ON_TOP, /* arg1= bool res= */ - VOUT_REPARENT, VOUT_SET_VIEWPORT, /* arg1= view rect, arg2=clip rect, res= */ VOUT_REDRAW_RECT, /* arg1= area rect, res= */ }; diff --git a/modules/gui/macosx/voutgl.m b/modules/gui/macosx/voutgl.m index 47dac9ee35..2b3f0c1099 100644 --- a/modules/gui/macosx/voutgl.m +++ b/modules/gui/macosx/voutgl.m @@ -779,17 +779,6 @@ static int aglControl( vout_thread_t *p_vout, int i_query, va_list args ) return VLC_SUCCESS; } - case VOUT_REPARENT: - { - AGLDrawable drawable = (AGLDrawable)va_arg( args, int); - if( !p_vout->b_fullscreen && drawable != p_vout->p_sys->agl_drawable ) - { - p_vout->p_sys->agl_drawable = drawable; - aglSetDrawable(p_vout->p_sys->agl_ctx, drawable); - } - return VLC_SUCCESS; - } - default: return VLC_EGENERIC; } diff --git a/modules/gui/minimal_macosx/voutagl.m b/modules/gui/minimal_macosx/voutagl.m index 68c20e9556..5554200c12 100644 --- a/modules/gui/minimal_macosx/voutagl.m +++ b/modules/gui/minimal_macosx/voutagl.m @@ -367,17 +367,6 @@ int aglControl( vout_thread_t *p_vout, int i_query, va_list args ) return VLC_SUCCESS; } - case VOUT_REPARENT: - { - AGLDrawable drawable = (AGLDrawable)va_arg( args, int); - if( !p_vout->b_fullscreen && drawable != p_vout->p_sys->agl_drawable ) - { - p_vout->p_sys->agl_drawable = drawable; - aglSetDrawable(p_vout->p_sys->agl_ctx, drawable); - } - return VLC_SUCCESS; - } - default: return VLC_EGENERIC; } diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c index 6dea945a55..73822ac6f1 100644 --- a/modules/video_output/msw/events.c +++ b/modules/video_output/msw/events.c @@ -1062,50 +1062,6 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args ) return VLC_SUCCESS; - case VOUT_REPARENT: - /* Retrieve the window position */ - point.x = point.y = 0; - ClientToScreen( p_vout->p_sys->hwnd, &point ); - - HWND d = 0; - - if( i_query == VOUT_REPARENT ) d = (HWND)va_arg( args, int ); - if( !d ) - { - vlc_mutex_lock( &p_vout->p_sys->lock ); - p_vout->p_sys->hparent = 0; - vlc_mutex_unlock( &p_vout->p_sys->lock ); - SetParent( p_vout->p_sys->hwnd, 0 ); - p_vout->p_sys->i_window_style = - WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW | WS_SIZEBOX; - SetWindowLong( p_vout->p_sys->hwnd, GWL_STYLE, - p_vout->p_sys->i_window_style | WS_VISIBLE); - SetWindowLong( p_vout->p_sys->hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW ); - SetWindowPos( p_vout->p_sys->hwnd, 0, point.x, point.y, 0, 0, - SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED ); - } - else - { - vlc_mutex_lock( &p_vout->p_sys->lock ); - p_vout->p_sys->hparent = d; - vlc_mutex_unlock( &p_vout->p_sys->lock ); - - SetParent( p_vout->p_sys->hwnd, d ); - p_vout->p_sys->i_window_style = WS_CLIPCHILDREN; - SetWindowLong( p_vout->p_sys->hwnd, GWL_STYLE, - p_vout->p_sys->i_window_style | WS_VISIBLE); - SetWindowLong( p_vout->p_sys->hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW ); - - /* Retrieve the parent size */ - RECT rect; - GetClientRect( d, &rect ); - SetWindowPos( p_vout->p_sys->hwnd, d, point.x, point.y, rect.right, rect.bottom, - SWP_FRAMECHANGED ); - } - - vout_ReleaseWindow( p_vout->p_sys->parent_window ); - return VLC_SUCCESS; - case VOUT_SET_STAY_ON_TOP: if( p_vout->p_sys->hparent && !var_GetBool( p_vout, "fullscreen" ) ) return vaControlParentWindow( p_vout, i_query, args ); diff --git a/modules/video_output/omapfb.c b/modules/video_output/omapfb.c index 4812b626ed..8a3337110f 100644 --- a/modules/video_output/omapfb.c +++ b/modules/video_output/omapfb.c @@ -373,14 +373,7 @@ static void End( vout_thread_t *p_vout ) *****************************************************************************/ static int Control( vout_thread_t *p_vout, int i_query, va_list args ) { - switch( i_query ) - { - case VOUT_REPARENT: - vout_ReleaseWindow( p_vout->p_sys->owner_window ); - return VLC_SUCCESS; - default: - return VLC_EGENERIC; - } + return VLC_EGENERIC; } /***************************************************************************** diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index 699a8cc550..7c05a88f4a 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -3150,30 +3150,6 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args ) #endif return VLC_SUCCESS; - case VOUT_REPARENT: - if( i_query == VOUT_REPARENT ) d = (Drawable)va_arg( args, int ); - if( !d ) - { -#ifdef MODULE_NAME_IS_xvmc - xvmc_context_reader_lock( &p_vout->p_sys->xvmc_lock ); -#endif - XReparentWindow( p_vout->p_sys->p_display, - p_vout->p_sys->original_window.base_window, - DefaultRootWindow( p_vout->p_sys->p_display ), - 0, 0 ); - } - else - XReparentWindow( p_vout->p_sys->p_display, - p_vout->p_sys->original_window.base_window, - d, 0, 0); - XSync( p_vout->p_sys->p_display, False ); -#ifdef MODULE_NAME_IS_xvmc - xvmc_context_reader_unlock( &p_vout->p_sys->xvmc_lock ); -#endif - vout_ReleaseWindow( p_vout->p_sys->p_win->owner_window ); - p_vout->p_sys->original_window.owner_window = NULL; - return VLC_SUCCESS; - case VOUT_SET_STAY_ON_TOP: if( p_vout->p_sys->p_win->owner_window ) return vout_ControlWindow( p_vout->p_sys->p_win->owner_window,