mirror of
https://github.com/yshui/picom.git
synced 2024-10-27 05:24:17 -04:00
backend: xrender: fix using of invalid picture when vsync is disabled
Fixes #974 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
1ea3276bd1
commit
c28462673e
1 changed files with 3 additions and 3 deletions
|
@ -594,13 +594,13 @@ static void present(backend_t *base, const region_t *region) {
|
|||
uint16_t region_width = to_u16_checked(extent->x2 - extent->x1),
|
||||
region_height = to_u16_checked(extent->y2 - extent->y1);
|
||||
|
||||
// compose() sets clip region on the back buffer, so clear it first
|
||||
x_clear_picture_clip_region(base->c, xd->back[xd->curr_back]);
|
||||
|
||||
// limit the region of update
|
||||
x_set_picture_clip_region(base->c, xd->back[2], 0, 0, region);
|
||||
|
||||
if (xd->vsync) {
|
||||
// compose() sets clip region on the back buffer, so clear it first
|
||||
x_clear_picture_clip_region(base->c, xd->back[xd->curr_back]);
|
||||
|
||||
// Update the back buffer first, then present
|
||||
xcb_render_composite(base->c, XCB_RENDER_PICT_OP_SRC, xd->back[2],
|
||||
XCB_NONE, xd->back[xd->curr_back], orig_x, orig_y, 0,
|
||||
|
|
Loading…
Reference in a new issue