backend interface: add IMAGE_OP_RESIZE_TILE

We need this to paint the wallpaper with repeat to mimic the behavior of Xorg's
background pixmap.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-09 18:01:18 +00:00
parent fb155c9769
commit c5d9f459dd
6 changed files with 32 additions and 9 deletions

View File

@ -951,6 +951,8 @@ root_damaged(session_t *ps) {
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->image_op(ps->backend_data, IMAGE_OP_RESIZE_TILE,
ps->root_image, NULL, NULL, (int[]){ps->root_width, ps->root_height});
}
}
@ -2088,7 +2090,7 @@ redir_stop(session_t *ps) {
if (ps->root_image) {
ps->backend_data->ops->release_image(ps->backend_data, ps->root_image);
ps->root_image = NULL;
}
}
} else {
free_paint(ps, &w->paint);
}