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
|
@ -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 New Issue