]> git.sesse.net Git - vlc/commitdiff
msw: small code factor
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Oct 2014 19:54:39 +0000 (22:54 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Oct 2014 17:23:38 +0000 (20:23 +0300)
modules/video_output/msw/events.c

index 45e237db40b139dc401cfb6a52cb50a48f60ee62..d47c9b4505e858fa6685f03785b26569982d3622 100644 (file)
@@ -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 )
     {