summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 66d3b6fc42..8ff2914c66 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2409,6 +2409,23 @@ static int mp_property_fullscreen(void *ctx, struct m_property *prop,
return r;
}
+/// Show playback progress in Windows 7+ taskbar (RW)
+static int mp_property_taskbar_progress(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ MPContext *mpctx = ctx;
+ if (action == M_PROPERTY_SET) {
+ int desired = !!*(int *) arg;
+ if (mpctx->opts->vo.taskbar_progress == desired)
+ return M_PROPERTY_OK;
+ mpctx->opts->vo.taskbar_progress = desired;
+ if (mpctx->video_out)
+ update_vo_playback_state( mpctx );
+ return M_PROPERTY_OK;
+ }
+ return mp_property_generic_option(mpctx, prop, action, arg);
+}
+
/// Window always on top (RW)
static int mp_property_ontop(void *ctx, struct m_property *prop,
int action, void *arg)
@@ -3703,6 +3720,7 @@ static const struct m_property mp_properties[] = {
{"fullscreen", mp_property_fullscreen},
{"deinterlace", mp_property_deinterlace},
{"field-dominance", mp_property_generic_option},
+ {"taskbar-progress", mp_property_taskbar_progress},
{"ontop", mp_property_ontop},
{"border", mp_property_border},
{"on-all-workspaces", mp_property_all_workspaces},
@@ -4036,6 +4054,7 @@ static const struct property_osd_display {
{ "balance", "Balance", .osd_progbar = OSD_BALANCE },
// video
{ "panscan", "Panscan", .osd_progbar = OSD_PANSCAN },
+ { "taskbar-progress", "Progress in taskbar" },
{ "ontop", "Stay on top" },
{ "border", "Border" },
{ "framedrop", "Framedrop" },