1
0
Fork 0
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:
Yuxuan Shui 2019-03-05 22:35:44 +00:00
parent d0fd21e167
commit 7e3976947b
No known key found for this signature in database
GPG key ID: 37C999F617EA1A47

View file

@ -240,7 +240,7 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) {
} }
pixman_region32_fini(&reg_damage); pixman_region32_fini(&reg_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(&reg_damage); auto extent = pixman_region32_extents(&reg_damage);
ps->backend_data->ops->fill_rectangle( ps->backend_data->ops->fill_rectangle(