diff options
author | wm4 <wm4@nowhere> | 2019-11-29 13:03:48 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-29 13:56:58 +0100 |
commit | 893f76045fc73fa28e36621413bcedf38225853b (patch) | |
tree | c5309a2577529d48402cbdf239bf413795429714 /video/out | |
parent | 4e4252f9169edc00c747ffc66fe0b627bbca7ba7 (diff) | |
download | mpv-893f76045fc73fa28e36621413bcedf38225853b.tar.bz2 mpv-893f76045fc73fa28e36621413bcedf38225853b.tar.xz |
x11: handle some more options with new option stuff
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/x11_common.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 9f44af23cd..362fd05149 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -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) |