mirror of https://github.com/mpv-player/mpv
parent
5649658c4e
commit
eb5a83e1c1
|
@ -1066,6 +1066,9 @@ Property list
|
||||||
``border`` (RW)
|
``border`` (RW)
|
||||||
See ``--border``.
|
See ``--border``.
|
||||||
|
|
||||||
|
``on-all-workspaces`` (RW)
|
||||||
|
See ``--on-all-workspaces``. Unsetting may not work on all WMs.
|
||||||
|
|
||||||
``framedrop`` (RW)
|
``framedrop`` (RW)
|
||||||
See ``--framedrop``.
|
See ``--framedrop``.
|
||||||
|
|
||||||
|
|
|
@ -1548,6 +1548,10 @@ 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.
|
||||||
|
|
||||||
|
``--on-all-workspaces``
|
||||||
|
(X11 only)
|
||||||
|
Show the video window on all virtual desktops.
|
||||||
|
|
||||||
``--geometry=<[W[xH]][+-x+-y]>``, ``--geometry=<x:y>``
|
``--geometry=<[W[xH]][+-x+-y]>``, ``--geometry=<x:y>``
|
||||||
Adjust the initial window position or size. ``W`` and ``H`` set the window
|
Adjust the initial window position or size. ``W`` and ``H`` set the window
|
||||||
size in pixels. ``x`` and ``y`` set the window position, measured in pixels
|
size in pixels. ``x`` and ``y`` set the window position, measured in pixels
|
||||||
|
|
|
@ -370,6 +370,7 @@ const m_option_t mp_opts[] = {
|
||||||
OPT_FLAG("force-window", force_vo, CONF_GLOBAL),
|
OPT_FLAG("force-window", force_vo, CONF_GLOBAL),
|
||||||
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("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),
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ typedef struct mp_vo_opts {
|
||||||
|
|
||||||
int ontop;
|
int ontop;
|
||||||
int fullscreen;
|
int fullscreen;
|
||||||
|
int border;
|
||||||
|
int all_workspaces;
|
||||||
|
|
||||||
int screen_id;
|
int screen_id;
|
||||||
int fsscreen_id;
|
int fsscreen_id;
|
||||||
int fs_black_out_screens;
|
int fs_black_out_screens;
|
||||||
|
@ -30,7 +33,6 @@ typedef struct mp_vo_opts {
|
||||||
|
|
||||||
int keepaspect;
|
int keepaspect;
|
||||||
int keepaspect_window;
|
int keepaspect_window;
|
||||||
int border;
|
|
||||||
|
|
||||||
int64_t WinID;
|
int64_t WinID;
|
||||||
|
|
||||||
|
|
|
@ -2272,6 +2272,14 @@ static int mp_property_border(void *ctx, struct m_property *prop,
|
||||||
&mpctx->opts->vo.border, mpctx);
|
&mpctx->opts->vo.border, mpctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mp_property_all_workspaces(void *ctx, struct m_property *prop,
|
||||||
|
int action, void *arg)
|
||||||
|
{
|
||||||
|
MPContext *mpctx = ctx;
|
||||||
|
return mp_property_vo_flag(prop, action, arg, VOCTRL_ALL_WORKSPACES,
|
||||||
|
&mpctx->opts->vo.all_workspaces, mpctx);
|
||||||
|
}
|
||||||
|
|
||||||
static int get_frame_count(struct MPContext *mpctx)
|
static int get_frame_count(struct MPContext *mpctx)
|
||||||
{
|
{
|
||||||
struct demuxer *demuxer = mpctx->demuxer;
|
struct demuxer *demuxer = mpctx->demuxer;
|
||||||
|
@ -3309,6 +3317,7 @@ static const struct m_property mp_properties[] = {
|
||||||
{"colormatrix-primaries", mp_property_primaries},
|
{"colormatrix-primaries", mp_property_primaries},
|
||||||
{"ontop", mp_property_ontop},
|
{"ontop", mp_property_ontop},
|
||||||
{"border", mp_property_border},
|
{"border", mp_property_border},
|
||||||
|
{"on-all-workspaces", mp_property_all_workspaces},
|
||||||
{"framedrop", mp_property_framedrop},
|
{"framedrop", mp_property_framedrop},
|
||||||
{"gamma", mp_property_video_color},
|
{"gamma", mp_property_video_color},
|
||||||
{"brightness", mp_property_video_color},
|
{"brightness", mp_property_video_color},
|
||||||
|
|
|
@ -47,8 +47,6 @@ enum mp_voctrl {
|
||||||
VOCTRL_RESET = 1,
|
VOCTRL_RESET = 1,
|
||||||
/* Handle input and redraw events, called by vo_check_events() */
|
/* Handle input and redraw events, called by vo_check_events() */
|
||||||
VOCTRL_CHECK_EVENTS,
|
VOCTRL_CHECK_EVENTS,
|
||||||
/* used to switch to fullscreen */
|
|
||||||
VOCTRL_FULLSCREEN,
|
|
||||||
/* signal a device pause */
|
/* signal a device pause */
|
||||||
VOCTRL_PAUSE,
|
VOCTRL_PAUSE,
|
||||||
/* start/resume playback */
|
/* start/resume playback */
|
||||||
|
@ -68,8 +66,11 @@ enum mp_voctrl {
|
||||||
// be updated and redrawn.
|
// be updated and redrawn.
|
||||||
VOCTRL_REDRAW_FRAME,
|
VOCTRL_REDRAW_FRAME,
|
||||||
|
|
||||||
|
VOCTRL_FULLSCREEN,
|
||||||
VOCTRL_ONTOP,
|
VOCTRL_ONTOP,
|
||||||
VOCTRL_BORDER,
|
VOCTRL_BORDER,
|
||||||
|
VOCTRL_ALL_WORKSPACES,
|
||||||
|
|
||||||
VOCTRL_UPDATE_WINDOW_TITLE, // char*
|
VOCTRL_UPDATE_WINDOW_TITLE, // char*
|
||||||
|
|
||||||
VOCTRL_SET_CURSOR_VISIBILITY, // bool*
|
VOCTRL_SET_CURSOR_VISIBILITY, // bool*
|
||||||
|
|
|
@ -1619,6 +1619,16 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
|
||||||
opts->border = !opts->border;
|
opts->border = !opts->border;
|
||||||
vo_x11_decoration(vo, vo->opts->border);
|
vo_x11_decoration(vo, vo->opts->border);
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
|
case VOCTRL_ALL_WORKSPACES: {
|
||||||
|
opts->all_workspaces = !opts->all_workspaces;
|
||||||
|
long params[5] = {0xFFFFFFFF, 1};
|
||||||
|
if (!opts->all_workspaces) {
|
||||||
|
x11_get_property_copy(x11, x11->rootwin, XA(x11, _NET_CURRENT_DESKTOP),
|
||||||
|
XA_CARDINAL, 32, ¶ms[0], sizeof(params[0]));
|
||||||
|
}
|
||||||
|
x11_send_ewmh_msg(x11, "_NET_WM_DESKTOP", params);
|
||||||
|
return VO_TRUE;
|
||||||
|
}
|
||||||
case VOCTRL_GET_UNFS_WINDOW_SIZE: {
|
case VOCTRL_GET_UNFS_WINDOW_SIZE: {
|
||||||
int *s = arg;
|
int *s = arg;
|
||||||
if (!x11->window)
|
if (!x11->window)
|
||||||
|
|
Loading…
Reference in New Issue