summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst6
-rw-r--r--options/options.c2
-rw-r--r--options/options.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index bb92133396..7b7db9396d 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -1805,6 +1805,12 @@ Window
Play video with window border and decorations. Since this is on by
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``
(X11 only)
Show the video window on all virtual desktops.
diff --git a/options/options.c b/options/options.c
index 30ae218ba2..16725e0478 100644
--- a/options/options.c
+++ b/options/options.c
@@ -399,6 +399,7 @@ const m_option_t mp_opts[] = {
({"no", 0}, {"yes", 1}, {"immediate", 2})),
OPT_FLAG("ontop", vo.ontop, 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("window-dragging", allow_win_drag, CONF_GLOBAL),
@@ -708,6 +709,7 @@ const struct MPOpts mp_default_opts = {
.keepaspect = 1,
.keepaspect_window = 1,
.border = 1,
+ .fit_border = 1,
.WinID = -1,
.window_scale = 1.0,
.x11_bypass_compositor = 0,
diff --git a/options/options.h b/options/options.h
index 95268cd522..6f21c0c683 100644
--- a/options/options.h
+++ b/options/options.h
@@ -12,6 +12,7 @@ typedef struct mp_vo_opts {
int ontop;
int fullscreen;
int border;
+ int fit_border;
int all_workspaces;
int screen_id;