From 3c33f4559f06688aed0c00d68641969b705ff46e Mon Sep 17 00:00:00 2001 From: matclab Date: Sun, 12 Jul 2020 14:44:47 +0200 Subject: [PATCH] No compositor if no _NET_WM_CM_Si atom close #734 --- src/x11/x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/x11/x.c b/src/x11/x.c index c575f40..7e4c374 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -146,7 +146,11 @@ static bool x_win_composited(struct window_x11 *win) sprintf(astr, "_NET_WM_CM_S%i", win->cur_screen); cm_sel = XInternAtom(xctx.dpy, astr, true); - return XGetSelectionOwner(xctx.dpy, cm_sel) != None; + if (cm_sel == None) { + return false; + } else { + return XGetSelectionOwner(xctx.dpy, cm_sel) != None; + } } void x_display_surface(cairo_surface_t *srf, struct window_x11 *win, const struct dimensions *dim)