summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-07-12 00:12:55 +0200
committerwm4 <wm4@nowhere>2020-07-12 00:12:55 +0200
commit4a93b046e954892edf3356bcd5745c612232fe15 (patch)
tree235153a1bf0393d7a576124994a7a48f71f00574 /video/out
parent06033df715b433d41b1a0855cf7805ff8f66d664 (diff)
downloadmpv-4a93b046e954892edf3356bcd5745c612232fe15.tar.bz2
mpv-4a93b046e954892edf3356bcd5745c612232fe15.tar.xz
x11: add option to make window appear on a specific workspace
Mess this into the --geometry option, because I like to be irresponsible. I considered adding a separate option, but at least this allows me to defer the question how the hell this should work as property (geometry simply and inherently does not). Tested on IceWM only. Option equality test and string output not tested.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/x11_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 40228903b9..461ff378d0 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1498,8 +1498,9 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
x11_send_ewmh_msg(x11, "_NET_WM_FULLSCREEN_MONITORS", params);
}
- if (x11->opts->all_workspaces) {
- long v = 0xFFFFFFFF;
+ if (x11->opts->all_workspaces || x11->opts->geometry.ws > 0) {
+ long v = x11->opts->all_workspaces
+ ? 0xFFFFFFFF : x11->opts->geometry.ws - 1;
XChangeProperty(x11->display, x11->window, XA(x11, _NET_WM_DESKTOP),
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&v, 1);
}