summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r--libvo/x11_common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 2fae9f480a..074e97bfed 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -337,6 +337,9 @@ static void init_atoms(struct vo_x11_state *x11)
XA_INIT(WM_PROTOCOLS);
XA_INIT(WM_DELETE_WINDOW);
XA_INIT(UTF8_STRING);
+ char buf[50];
+ sprintf(buf, "_NET_WM_CM_S%d", x11->screen);
+ x11->XA_NET_WM_CM = XInternAtom(x11->display, buf, False);
}
void update_xinerama_info(struct vo *vo) {
@@ -1942,6 +1945,12 @@ uint32_t vo_x11_get_equalizer(const char *name, int *value)
return VO_TRUE;
}
+bool vo_x11_screen_is_composited(struct vo *vo)
+{
+ struct vo_x11_state *x11 = vo->x11;
+ return XGetSelectionOwner(x11->display, x11->XA_NET_WM_CM) != None;
+}
+
#ifdef CONFIG_XV
int vo_xv_set_eq(struct vo *vo, uint32_t xv_port, const char *name, int value)
{