mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
x11: handle some more options with new option stuff
This commit is contained in:
parent
4e4252f916
commit
893f76045f
@ -1825,24 +1825,23 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
|
||||
while (m_config_cache_get_next_changed(x11->opts_cache, &opt)) {
|
||||
if (opt == &opts->fullscreen)
|
||||
vo_x11_fullscreen(vo);
|
||||
if (opt == &opts->ontop)
|
||||
vo_x11_setlayer(vo, opts->ontop);
|
||||
if (opt == &opts->border)
|
||||
vo_x11_decoration(vo, opts->border);
|
||||
if (opt == &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_ONTOP:
|
||||
vo_x11_setlayer(vo, opts->ontop);
|
||||
return VO_TRUE;
|
||||
case VOCTRL_BORDER:
|
||||
vo_x11_decoration(vo, opts->border);
|
||||
return VO_TRUE;
|
||||
case VOCTRL_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: {
|
||||
int *s = arg;
|
||||
if (!x11->window || x11->parent)
|
||||
|
Loading…
Reference in New Issue
Block a user