From e330464126825c42b75f7667669a74bec0934347 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 6 May 2019 01:20:38 +0100 Subject: [PATCH] core: acquire X compositor selection first Don't do anything with the overlay window with out the compositor selection. Signed-off-by: Yuxuan Shui --- src/compton.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compton.c b/src/compton.c index c962c46e..82e911aa 100644 --- a/src/compton.c +++ b/src/compton.c @@ -1830,6 +1830,11 @@ static session_t *session_init(int argc, char **argv, Display *dpy, rebuild_screen_reg(ps); + // Create registration window + if (!ps->reg_win && !register_cm(ps)) { + exit(1); + } + // Overlay must be initialized before double buffer, and before creation // of OpenGL context. if (!init_overlay(ps)) { @@ -1879,10 +1884,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy, cxinerama_upd_scrs(ps); - // Create registration window - if (!ps->reg_win && !register_cm(ps)) - exit(1); - { xcb_render_create_picture_value_list_t pa = { .subwindowmode = IncludeInferiors,