mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
Fix crash when using monitor-repaint
If monitor-repaint is not implemented by the backend, compton will crash. This commit fix the crash by not doing monitor-repaint in that case. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
d0fd21e167
commit
7e3976947b
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) {
|
||||||
}
|
}
|
||||||
pixman_region32_fini(®_damage);
|
pixman_region32_fini(®_damage);
|
||||||
|
|
||||||
if (ps->o.monitor_repaint) {
|
if (ps->o.monitor_repaint && ps->backend_data->ops->fill_rectangle) {
|
||||||
reg_damage = get_damage(ps, false);
|
reg_damage = get_damage(ps, false);
|
||||||
auto extent = pixman_region32_extents(®_damage);
|
auto extent = pixman_region32_extents(®_damage);
|
||||||
ps->backend_data->ops->fill_rectangle(
|
ps->backend_data->ops->fill_rectangle(
|
||||||
|
|
Loading…
Reference in a new issue