vlc | branch: master | Steve Lhomme <[email protected]> | Tue Apr 2 16:00:29 2019 +0200| [960cb318a165965cc7f60d2b0b4fcef8052e4896] | committer: Steve Lhomme
vout:win32: the main HWND is never decorated Only the standalone Win32 vout_window_t is decorated. We don't take care of it in the display module anymore. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=960cb318a165965cc7f60d2b0b4fcef8052e4896 --- modules/video_output/win32/common.c | 16 ++++------------ modules/video_output/win32/events.c | 32 ++++---------------------------- modules/video_output/win32/events.h | 1 - 3 files changed, 8 insertions(+), 41 deletions(-) diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c index 1357de24a7..03d15c06c1 100644 --- a/modules/video_output/win32/common.c +++ b/modules/video_output/win32/common.c @@ -97,8 +97,6 @@ int CommonInit(vlc_object_t *obj, display_win32_area_t *area, sys->is_first_placement = true; sys->is_on_top = false; - var_Create(obj, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT); - /* */ sys->event = EventThreadCreate(obj, area->vdcfg.window); if (!sys->event) @@ -279,17 +277,11 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s { /* Update dimensions */ area->vdcfg = *va_arg(args, const vout_display_cfg_t *); #if !VLC_WINSTORE_APP - if (!area->vdcfg.is_fullscreen && sys->event != NULL) { - RECT rect_window = { - .top = 0, - .left = 0, - .right = area->vdcfg.display.width, - .bottom = area->vdcfg.display.height, - }; - AdjustWindowRect(&rect_window, EventThreadGetWindowStyle(sys->event), 0); + if (sys->event != NULL) + { SetWindowPos(sys->hwnd, 0, 0, 0, - RECTWidth(rect_window), - RECTHeight(rect_window), SWP_NOZORDER|SWP_NOMOVE); + area->vdcfg.display.width, + area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE); } #endif /* !VLC_WINSTORE_APP */ UpdateRects(vd, area, sys); diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c index debf38ea1c..c4fa3b8f1d 100644 --- a/modules/video_output/win32/events.c +++ b/modules/video_output/win32/events.c @@ -71,7 +71,6 @@ struct event_thread_t /* Gestures */ win32_gesture_sys_t *p_gesture; - int i_window_style; RECT window_area; /* */ @@ -342,12 +341,6 @@ static void *EventThread( void *p_this ) return NULL; } -int EventThreadGetWindowStyle( event_thread_t *p_event ) -{ - /* No need to lock, it is serialized by EventThreadStart */ - return p_event->i_window_style; -} - void EventThreadUpdatePlace( event_thread_t *p_event, const vout_display_place_t *p_place ) { @@ -674,19 +667,6 @@ static int Win32VoutCreateWindow( event_thread_t *p_event ) return VLC_EGENERIC; } - /* When you create a window you give the dimensions you wish it to - * have. Unfortunatly these dimensions will include the borders and - * titlebar. We use the following function to find out the size of - * the window corresponding to the useable surface we want */ - RECT decorated_window = p_event->window_area; - i_style = var_GetBool( p_event->obj, "video-deco" ) - /* Open with window decoration */ - ? WS_OVERLAPPEDWINDOW|WS_SIZEBOX - /* No window decoration */ - : WS_POPUP; - AdjustWindowRect( &decorated_window, i_style, 0 ); - i_style |= WS_VISIBLE|WS_CLIPCHILDREN; - if( p_event->hparent ) { i_style = WS_VISIBLE|WS_CLIPCHILDREN|WS_CHILD; @@ -698,20 +678,16 @@ static int Win32VoutCreateWindow( event_thread_t *p_event ) i_style |= WS_DISABLED; } - p_event->i_window_style = i_style; - /* Create the window */ p_event->hwnd = CreateWindowEx( WS_EX_NOPARENTNOTIFY, p_event->class_main, /* name of window class */ TEXT(VOUT_TITLE) TEXT(" (VLC Video Output)"),/* window title */ i_style, /* window style */ - (!p_event->window_area.left) ? CW_USEDEFAULT : - p_event->window_area.left, /* default X coordinate */ - (!p_event->window_area.top) ? CW_USEDEFAULT : - p_event->window_area.top, /* default Y coordinate */ - RECTWidth(decorated_window), /* window width */ - RECTHeight(decorated_window), /* window height */ + CW_USEDEFAULT, /* default X coordinate */ + CW_USEDEFAULT, /* default Y coordinate */ + RECTWidth(p_event->window_area), /* window width */ + RECTHeight(p_event->window_area), /* window height */ p_event->hparent, /* parent window */ NULL, /* no menu in this window */ hInstance, /* handle of this program instance */ diff --git a/modules/video_output/win32/events.h b/modules/video_output/win32/events.h index 7353ebacf9..e2e518ccb5 100644 --- a/modules/video_output/win32/events.h +++ b/modules/video_output/win32/events.h @@ -47,7 +47,6 @@ void EventThreadDestroy( event_thread_t * ); int EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * ); void EventThreadStop( event_thread_t * ); -int EventThreadGetWindowStyle( event_thread_t * ); void EventThreadUpdatePlace( event_thread_t *p_event, const vout_display_place_t *p_place ); bool EventThreadGetAndResetSizeChanged( event_thread_t * ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
