options: add --fit-border video option

Flag that is set by default. Reseting it will result in mpv trying to fit
client area with video instead of the whole window with border and
decorations on the screen.
Marked as (Windows only) for now until it's implemented on other platforms.
This commit is contained in:
maniak1349 2016-04-26 04:46:49 +03:00 committed by wm4
parent 5c90352ae6
commit 70f64f3ca9
3 changed files with 9 additions and 0 deletions

View File

@ -1805,6 +1805,12 @@ Window
Play video with window border and decorations. Since this is on by Play video with window border and decorations. Since this is on by
default, use ``--no-border`` to disable the standard window decorations. default, use ``--no-border`` to disable the standard window decorations.
``--fit-border``, ``--no-fit-border``
(Windows only) Fit the whole window with border and decorations on the
screen. Since this is on by default, use ``--no-fit-border`` to make mpv
try to only fit client area with video on the screen. This behavior only
applied to window/video with size exceeding size of the screen.
``--on-all-workspaces`` ``--on-all-workspaces``
(X11 only) (X11 only)
Show the video window on all virtual desktops. Show the video window on all virtual desktops.

View File

@ -399,6 +399,7 @@ const m_option_t mp_opts[] = {
({"no", 0}, {"yes", 1}, {"immediate", 2})), ({"no", 0}, {"yes", 1}, {"immediate", 2})),
OPT_FLAG("ontop", vo.ontop, M_OPT_FIXED), OPT_FLAG("ontop", vo.ontop, M_OPT_FIXED),
OPT_FLAG("border", vo.border, M_OPT_FIXED), OPT_FLAG("border", vo.border, M_OPT_FIXED),
OPT_FLAG("fit-border", vo.fit_border, M_OPT_FIXED),
OPT_FLAG("on-all-workspaces", vo.all_workspaces, M_OPT_FIXED), OPT_FLAG("on-all-workspaces", vo.all_workspaces, M_OPT_FIXED),
OPT_FLAG("window-dragging", allow_win_drag, CONF_GLOBAL), OPT_FLAG("window-dragging", allow_win_drag, CONF_GLOBAL),
@ -708,6 +709,7 @@ const struct MPOpts mp_default_opts = {
.keepaspect = 1, .keepaspect = 1,
.keepaspect_window = 1, .keepaspect_window = 1,
.border = 1, .border = 1,
.fit_border = 1,
.WinID = -1, .WinID = -1,
.window_scale = 1.0, .window_scale = 1.0,
.x11_bypass_compositor = 0, .x11_bypass_compositor = 0,

View File

@ -12,6 +12,7 @@ typedef struct mp_vo_opts {
int ontop; int ontop;
int fullscreen; int fullscreen;
int border; int border;
int fit_border;
int all_workspaces; int all_workspaces;
int screen_id; int screen_id;