static void check_events(void) { int ret = vo_x11_check_events(mDisplay); if (ret & VO_EVENT_RESIZE) vo_x11_clearwindow(mDisplay, vo_window); else if (ret & VO_EVENT_EXPOSE) vo_x11_clearwindow_part(mDisplay, vo_window, myximage->width, myximage->height, vo_fs); if (ret & VO_EVENT_EXPOSE && int_pause) flip_page(); }
static void check_events(struct vo *vo) { struct priv *p = vo->priv; int ret = vo_x11_check_events(vo); if (ret & VO_EVENT_RESIZE) vo_x11_clearwindow(vo, vo->x11->window); else if (ret & VO_EVENT_EXPOSE) vo_x11_clearwindow_part(vo, vo->x11->window, p->myximage->width, p->myximage->height); if (ret & VO_EVENT_EXPOSE && p->int_pause) flip_page(vo); }
static void resize(struct vo *vo) { struct xvctx *ctx = vo->priv; // Can't be used, because the function calculates screen-space coordinates, // while we need video-space. struct mp_osd_res unused; vo_get_src_dst_rects(vo, &ctx->src_rect, &ctx->dst_rect, &unused); struct mp_rect *dst = &ctx->dst_rect; int dw = dst->x1 - dst->x0, dh = dst->y1 - dst->y0; vo_x11_clearwindow_part(vo, vo->x11->window, dw, dh); vo_xv_draw_colorkey(vo, dst->x0, dst->y0, dw, dh); read_xv_csp(vo); }