else
{
/* Change window style, no borders and no title bar */
- int i_style = WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW |
- WS_SIZEBOX | WS_VISIBLE;
- SetWindowLong( hwnd, GWL_STYLE, i_style );
+ SetWindowLong( hwnd, GWL_STYLE, p_vout->p_sys->i_window_style );
/* Normal window */
window_placement.showCmd = SW_SHOWNORMAL;
WNDCLASS wc; /* window class components */
HICON vlc_icon = NULL;
char vlc_path[MAX_PATH+1];
- int i_style;
+ int i_style, i_stylex;
msg_Dbg( p_vout, "DirectXCreateWindow" );
rect_window.left = 10;
rect_window.right = rect_window.left + p_vout->p_sys->i_window_width;
rect_window.bottom = rect_window.top + p_vout->p_sys->i_window_height;
- AdjustWindowRect( &rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0 );
- i_style = WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE|WS_CLIPCHILDREN;
+ if( var_GetBool( p_vout, "video-deco" ) )
+ {
+ /* Open with window decoration */
+ AdjustWindowRect( &rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0 );
+ i_style = WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE|WS_CLIPCHILDREN;
+ i_stylex = 0;
+ }
+ else
+ {
+ /* No window decoration */
+ AdjustWindowRect( &rect_window, WS_POPUP, 0 );
+ i_style = WS_POPUP|WS_VISIBLE|WS_CLIPCHILDREN;
+ i_stylex = 0; // WS_EX_TOOLWINDOW; Is TOOLWINDOW really needed ?
+ // It messes up the fullscreen window.
+ }
if( p_vout->p_sys->hparent )
{
i_style = WS_VISIBLE|WS_CLIPCHILDREN|WS_CHILD;
+ i_stylex = 0;
}
+ p_vout->p_sys->i_window_style = i_style;
+
/* Create the window */
p_vout->p_sys->hwnd =
- CreateWindowEx( WS_EX_NOPARENTNOTIFY,
+ CreateWindowEx( WS_EX_NOPARENTNOTIFY | i_stylex,
_T("VLC DirectX"), /* name of window class */
_T(VOUT_TITLE) _T(" (DirectX Output)"), /* window title */
i_style, /* window style */
rect_window.top = rect_window.left = 0;
rect_window.right = p_vout->i_window_width * f_arg;
rect_window.bottom = p_vout->i_window_height * f_arg;
- AdjustWindowRect( &rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0 );
+ AdjustWindowRect( &rect_window, p_vout->p_sys->i_window_style, 0 );
SetWindowPos( p_vout->p_sys->hwnd, 0, 0, 0,
rect_window.right - rect_window.left,
else\r
{\r
/* Change window style, no borders and no title bar */\r
- int i_style = WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW |\r
- WS_SIZEBOX | WS_VISIBLE;\r
- SetWindowLong( hwnd, GWL_STYLE, i_style );\r
+ SetWindowLong( hwnd, GWL_STYLE, p_vout->p_sys->i_window_style );\r
\r
/* Normal window */\r
window_placement.showCmd = SW_SHOWNORMAL;\r
int i_window_y;
int i_window_width;
int i_window_height;
+ int i_window_style;
/* Coordinates of src and dest images (used when blitting to display) */
RECT rect_src;
#define VIDEO_ON_TOP_LONGTEXT N_("Always place the video window on top of " \
"other windows." )
+#define VIDEO_DECO_TEXT N_("Window decorations")
+#define VIDEO_DECO_LONGTEXT N_( \
+ "If this option is disabled, VLC will avoid creating window caption, " \
+ "frames, etc... around the video. Currently only supported on Windows.")
+
#define FILTER_TEXT N_("Video filter module")
#define FILTER_LONGTEXT N_( \
"This will allow you to add a post-processing filter to enhance the " \
add_bool( "video-on-top", 0, NULL, VIDEO_ON_TOP_TEXT,
VIDEO_ON_TOP_LONGTEXT, VLC_FALSE );
+ add_bool( "video-deco", 0, NULL, VIDEO_DECO_TEXT,
+ VIDEO_DECO_LONGTEXT, VLC_TRUE );
add_module( "filter", "video filter", NULL, NULL,
FILTER_TEXT, FILTER_LONGTEXT, VLC_FALSE );
add_string( "aspect-ratio", "", NULL,
var_Change( p_vout, "video-on-top", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "video-on-top", OnTopCallback, NULL );
+ /* Add a variable to indicate whether we want window decoration or not */
+ var_Create( p_vout, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
+
/* Add a fullscreen variable */
var_Create( p_vout, "fullscreen", VLC_VAR_BOOL );
text.psz_string = _("Fullscreen");