summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-16 23:38:47 +0100
committerwm4 <wm4@nowhere>2015-01-16 23:38:47 +0100
commiteb5a83e1c110234b3e835b7a76d83e1ddaa7bfb5 (patch)
tree16189fc460f5f2fb5cc9920a8d1e72a0e18f7fcc /video/out
parent5649658c4e12eb98af9da3a21b644c40cd1b2313 (diff)
downloadmpv-eb5a83e1c110234b3e835b7a76d83e1ddaa7bfb5.tar.bz2
mpv-eb5a83e1c110234b3e835b7a76d83e1ddaa7bfb5.tar.xz
x11: add --on-all-workspaces option and property
Fixes #1469.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo.h5
-rw-r--r--video/out/x11_common.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 20223493cd..5d136432e3 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -47,8 +47,6 @@ enum mp_voctrl {
VOCTRL_RESET = 1,
/* Handle input and redraw events, called by vo_check_events() */
VOCTRL_CHECK_EVENTS,
- /* used to switch to fullscreen */
- VOCTRL_FULLSCREEN,
/* signal a device pause */
VOCTRL_PAUSE,
/* start/resume playback */
@@ -68,8 +66,11 @@ enum mp_voctrl {
// be updated and redrawn.
VOCTRL_REDRAW_FRAME,
+ VOCTRL_FULLSCREEN,
VOCTRL_ONTOP,
VOCTRL_BORDER,
+ VOCTRL_ALL_WORKSPACES,
+
VOCTRL_UPDATE_WINDOW_TITLE, // char*
VOCTRL_SET_CURSOR_VISIBILITY, // bool*
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index e280349d24..be1f1b74ed 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1619,6 +1619,16 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
opts->border = !opts->border;
vo_x11_decoration(vo, vo->opts->border);
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, &params[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)