core: exit if paint_preprocess fails

This usually means there is another compositor running. If we don't do
this picom will spin forever.

Fixes #1104

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2023-12-17 23:34:34 +00:00
parent e92745671b
commit 268e1d890a
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 5 additions and 0 deletions

View File

@ -1741,6 +1741,11 @@ static void draw_callback_impl(EV_P_ session_t *ps, int revents attr_unused) {
auto bottom = paint_preprocess(ps, &fade_running, &animation);
ps->tmout_unredir_hit = false;
if (!bottom) {
log_fatal("Pre-render preparation has failed, exiting...");
exit(1);
}
if (!was_redirected && ps->redirected) {
// paint_preprocess redirected the screen, which might change the state of
// some of the windows (e.g. the window image might become stale).