Skip to content

Commit

Permalink
core: init legacy backend after we have root geometry
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
yshui committed Jun 27, 2024
1 parent 56fea38 commit 843f308
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2412,12 +2412,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;
Expand Down Expand Up @@ -2579,6 +2573,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);
Expand Down

0 comments on commit 843f308

Please sign in to comment.