+ vout_display_sys_t *p_sys = vd->sys;
+ xcb_shm_seg_t segment = pic->p_sys->segment;
+ xcb_void_cookie_t ck;
+
+ if (!p_sys->visible)
+ goto out;
+ if (segment != 0)
+ ck = xcb_shm_put_image_checked (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 */ vd->fmt.i_x_offset,
+ /* y */ vd->fmt.i_y_offset,
+ /* width */ vd->fmt.i_visible_width,
+ /* height */ vd->fmt.i_visible_height,
+ 0, 0, p_sys->depth, XCB_IMAGE_FORMAT_Z_PIXMAP,
+ 0, segment, 0);
+ else
+ {
+ const size_t offset = vd->fmt.i_y_offset * pic->p->i_pitch;
+ const unsigned lines = pic->p->i_lines - vd->fmt.i_y_offset;
+
+ ck = xcb_put_image_checked (p_sys->conn, XCB_IMAGE_FORMAT_Z_PIXMAP,
+ p_sys->window, p_sys->gc,
+ pic->p->i_pitch / pic->p->i_pixel_pitch,
+ lines, -vd->fmt.i_x_offset, 0, 0, p_sys->depth,
+ pic->p->i_pitch * lines, pic->p->p_pixels + offset);
+ }