core: don't crash when binding root pixmap failed
Fixes #767 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
10
src/picom.c
10
src/picom.c
@@ -898,9 +898,13 @@ void root_damaged(session_t *ps) {
|
||||
if (pixmap != XCB_NONE) {
|
||||
ps->root_image = ps->backend_data->ops->bind_pixmap(
|
||||
ps->backend_data, pixmap, x_get_visual_info(ps->c, ps->vis), false);
|
||||
ps->backend_data->ops->set_image_property(
|
||||
ps->backend_data, IMAGE_PROPERTY_EFFECTIVE_SIZE,
|
||||
ps->root_image, (int[]){ps->root_width, ps->root_height});
|
||||
if (ps->root_image) {
|
||||
ps->backend_data->ops->set_image_property(
|
||||
ps->backend_data, IMAGE_PROPERTY_EFFECTIVE_SIZE,
|
||||
ps->root_image, (int[]){ps->root_width, ps->root_height});
|
||||
} else {
|
||||
log_error("Failed to bind root back pixmap");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user