Commit 75ff8a59 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB/X11: fix crop

parent 43dd12e4
......@@ -378,17 +378,24 @@ static void Display (vout_thread_t *vout, picture_t *pic)
if (segment != 0)
xcb_shm_put_image (p_sys->conn, p_sys->window, p_sys->gc,
/* real width */ pic->p->i_pitch / pic->p->i_pixel_pitch,
/* real height */ pic->p->i_lines, /* x */ 0, /* y */ 0,
/* width */ pic->p->i_visible_pitch / pic->p->i_pixel_pitch,
/* height */ pic->p->i_visible_lines, /* x */ 0, /* y */ 0,
p_sys->depth, XCB_IMAGE_FORMAT_Z_PIXMAP,
/* real height */ pic->p->i_lines,
/* x */ vout->fmt_out.i_x_offset,
/* y */ vout->fmt_out.i_y_offset,
/* width */ vout->fmt_out.i_visible_width,
/* height */ vout->fmt_out.i_visible_height,
0, 0, p_sys->depth, XCB_IMAGE_FORMAT_Z_PIXMAP,
0, segment, 0);
else
{
const size_t offset = vout->fmt_out.i_y_offset * pic->p->i_pitch;
const unsigned lines = pic->p->i_lines - vout->fmt_out.i_y_offset;
xcb_put_image (p_sys->conn, XCB_IMAGE_FORMAT_Z_PIXMAP,
p_sys->window, p_sys->gc,
pic->p->i_pitch / pic->p->i_pixel_pitch,
pic->p->i_lines, 0, 0, 0, p_sys->depth,
pic->p->i_pitch * pic->p->i_lines, pic->p->p_pixels);
lines, -vout->fmt_out.i_x_offset, 0, 0, p_sys->depth,
pic->p->i_pitch * lines, pic->p->p_pixels + offset);
}
xcb_flush (p_sys->conn);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment