From 8f81a4a256330a8df693df0af57ea02b881ee588 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 9 Oct 2014 22:54:39 +0300 Subject: [PATCH] msw: small code factor --- modules/video_output/msw/events.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c index 45e237db40..d47c9b4505 100644 --- a/modules/video_output/msw/events.c +++ b/modules/video_output/msw/events.c @@ -757,18 +757,13 @@ static int Win32VoutCreateWindow( event_thread_t *p_event ) rect_window.right = rect_window.left + p_event->width; rect_window.bottom = rect_window.top + p_event->height; - if( var_GetBool( vd, "video-deco" ) ) - { + i_style = var_GetBool( vd, "video-deco" ) /* Open with window decoration */ - AdjustWindowRect( &rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0 ); - i_style = WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE|WS_CLIPCHILDREN; - } - else - { + ? WS_OVERLAPPEDWINDOW|WS_SIZEBOX /* No window decoration */ - AdjustWindowRect( &rect_window, WS_POPUP, 0 ); - i_style = WS_POPUP|WS_VISIBLE|WS_CLIPCHILDREN; - } + : WS_POPUP; + AdjustWindowRect( &rect_window, i_style, 0 ); + i_style |= WS_VISIBLE|WS_CLIPCHILDREN; if( p_event->hparent ) { -- 2.39.2