summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-05-20 16:51:12 -0500
committerDudemanguy <random342@airmail.cc>2023-06-12 20:50:08 +0000
commit8ecf2d37ebd31afaed9f8c3ed952f08a572ddf00 (patch)
tree22702b92698b87747860f281fbf828e07fb671e3 /options/options.c
parent2f8d9322fd8f1bcc4ec27b917f042253e2d6b62d (diff)
downloadmpv-8ecf2d37ebd31afaed9f8c3ed952f08a572ddf00.tar.bz2
mpv-8ecf2d37ebd31afaed9f8c3ed952f08a572ddf00.tar.xz
player: add drag-and-drop option
Some platforms (wayland) apparently have a lot of trouble with drag and drop. The default behavior is still the same which is basically obeying what we get from the window manager/compositor, but the --drag-and-drop option allows forcibly overriding the drag and drop behavior. i.e. you can force it to always replace the playlist or append at the end. This only implements this in X11 and Wayland but in theory windows and macos could find this option useful (both hardcode the shift key for appending). Patches welcome.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index 5401ab126b..189a5e4b71 100644
--- a/options/options.c
+++ b/options/options.c
@@ -106,6 +106,8 @@ static const struct m_sub_options screenshot_conf = {
static const m_option_t mp_vo_opt_list[] = {
{"vo", OPT_SETTINGSLIST(video_driver_list, &vo_obj_list)},
{"taskbar-progress", OPT_BOOL(taskbar_progress)},
+ {"drag-and-drop", OPT_CHOICE(drag_and_drop, {"auto", -1}, {"replace", 0},
+ {"append", 1})},
{"snap-window", OPT_BOOL(snap_window)},
{"ontop", OPT_BOOL(ontop)},
{"ontop-level", OPT_CHOICE(ontop_level, {"window", -1}, {"system", -2},
@@ -196,6 +198,7 @@ const struct m_sub_options vo_sub_opts = {
.size = sizeof(struct mp_vo_opts),
.defaults = &(const struct mp_vo_opts){
.video_driver_list = NULL,
+ .drag_and_drop = -1,
.monitor_pixel_aspect = 1.0,
.screen_id = -1,
.fsscreen_id = -1,