diff options
author | der richter <der.richter@gmx.de> | 2024-03-10 13:44:40 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-03-10 14:53:07 +0100 |
commit | 0ec385bc763567cbab4532b3579cd24b07958802 (patch) | |
tree | 3b1f1abe8801d8c9c3a998478d41c5ccbe638eb7 /options | |
parent | a56d8ff18470e4612cbb23e35e7849b8e522ba7e (diff) | |
download | mpv-0ec385bc763567cbab4532b3579cd24b07958802.tar.bz2 mpv-0ec385bc763567cbab4532b3579cd24b07958802.tar.xz |
options: remove --focus-on-open and add --focus-on
replaces the old focus-on-open option with a more generic focus-on
options that can be extended.
adjust the only platform that uses that option.
Fixes #8337
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 5 | ||||
-rw-r--r-- | options/options.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/options/options.c b/options/options.c index 796a6c668b..3db965a3f7 100644 --- a/options/options.c +++ b/options/options.c @@ -131,7 +131,8 @@ static const m_option_t mp_vo_opt_list[] = { {"window-scale", OPT_DOUBLE(window_scale), M_RANGE(0.001, 100)}, {"window-minimized", OPT_BOOL(window_minimized)}, {"window-maximized", OPT_BOOL(window_maximized)}, - {"focus-on-open", OPT_BOOL(focus_on_open)}, + {"focus-on-open", OPT_REMOVED("Replaced by --focus-on")}, + {"focus-on", OPT_CHOICE(focus_on, {"never", 0}, {"open", 1}, {"all", 2})}, {"force-render", OPT_BOOL(force_render)}, {"force-window-position", OPT_BOOL(force_window_position)}, {"x11-name", OPT_STRING(winname)}, @@ -254,7 +255,7 @@ const struct m_sub_options vo_sub_opts = { .ontop_level = -1, .timing_offset = 0.050, .swapchain_depth = 3, - .focus_on_open = true, + .focus_on = 1, }, }; diff --git a/options/options.h b/options/options.h index 1b7c3e3583..4d3d988789 100644 --- a/options/options.h +++ b/options/options.h @@ -20,7 +20,7 @@ typedef struct mp_vo_opts { bool all_workspaces; bool window_minimized; bool window_maximized; - bool focus_on_open; + int focus_on; int screen_id; char *screen_name; |