From f0f7f4a2e7fa13156debb17a894dd45d1bbf4a44 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 27 Jun 2024 14:05:24 +0100 Subject: [PATCH] core: init legacy backend after we have root geometry We moved root geometry query to a later point than before, but forgot the legacy backends need that for initialization. Signed-off-by: Yuxuan Shui --- src/picom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/picom.c b/src/picom.c index 4e797a75fd..ec0e3cdeb6 100644 --- a/src/picom.c +++ b/src/picom.c @@ -2410,12 +2410,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy, ps->drivers = detect_driver(ps->c.c, ps->backend_data, ps->c.screen_info->root); apply_driver_workarounds(ps, ps->drivers); - // Initialize filters, must be preceded by OpenGL context creation - if (ps->o.use_legacy_backends && !init_render(ps)) { - log_fatal("Failed to initialize the backend"); - exit(1); - } - if (ps->o.print_diagnostics) { ps->root_width = ps->c.screen_info->width_in_pixels; ps->root_height = ps->c.screen_info->height_in_pixels; @@ -2577,6 +2571,12 @@ static session_t *session_init(int argc, char **argv, Display *dpy, free(r); rebuild_screen_reg(ps); + // Initialize filters, must be preceded by OpenGL context creation + if (ps->o.use_legacy_backends && !init_render(ps)) { + log_fatal("Failed to initialize the backend"); + exit(1); + } + ps->pending_updates = true; write_pid(ps);