summaryrefslogtreecommitdiffstats
path: root/video/out/vo_xv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-16 14:02:28 +0200
committerwm4 <wm4@nowhere>2013-05-26 16:44:19 +0200
commitd5de75b340a124e83aa1bc7c76ecbdfd0b7037df (patch)
treec863999a2be27a77cfa43d2892174ccf1c19d973 /video/out/vo_xv.c
parentbf10a4fdfa40cbe519e6ccb7fb895332da2021d1 (diff)
downloadmpv-d5de75b340a124e83aa1bc7c76ecbdfd0b7037df.tar.bz2
mpv-d5de75b340a124e83aa1bc7c76ecbdfd0b7037df.tar.xz
x11: use vo_x11_control() for all VOs
Diffstat (limited to 'video/out/vo_xv.c')
-rw-r--r--video/out/vo_xv.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 8ae5a31a9a..d119125db4 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -657,16 +657,6 @@ static struct mp_image get_xv_buffer(struct vo *vo, int buf_index)
return img;
}
-static void check_events(struct vo *vo)
-{
- int e = vo_x11_check_events(vo);
-
- if (e & VO_EVENT_EXPOSE || e & VO_EVENT_RESIZE) {
- resize(vo);
- vo->want_redraw = true;
- }
-}
-
static void draw_osd(struct vo *vo, struct osd_state *osd)
{
struct xvctx *ctx = vo->priv;
@@ -696,7 +686,7 @@ static void wait_for_completion(struct vo *vo, int max_outstanding)
ctx->Shm_Warned_Slow = 1;
}
usec_sleep(1000);
- check_events(vo);
+ vo_x11_check_events(vo);
}
}
#endif
@@ -921,9 +911,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
switch (request) {
case VOCTRL_GET_PANSCAN:
return VO_TRUE;
- case VOCTRL_FULLSCREEN:
- vo_x11_fullscreen(vo);
- /* indended, fallthrough to update panscan on fullscreen/windowed switch */
case VOCTRL_SET_PANSCAN:
resize(vo);
return VO_TRUE;
@@ -948,12 +935,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
read_xv_csp(vo);
*cspc = ctx->cached_csp;
return true;
- case VOCTRL_ONTOP:
- vo_x11_ontop(vo);
- return VO_TRUE;
- case VOCTRL_UPDATE_SCREENINFO:
- vo_x11_update_screeninfo(vo);
- return VO_TRUE;
case VOCTRL_REDRAW_FRAME:
return redraw_frame(vo);
case VOCTRL_SCREENSHOT: {
@@ -962,7 +943,13 @@ static int control(struct vo *vo, uint32_t request, void *data)
return true;
}
}
- return VO_NOTIMPL;
+ int events = 0;
+ int r = vo_x11_control(vo, &events, request, data);
+ if (events & (VO_EVENT_EXPOSE | VO_EVENT_RESIZE)) {
+ resize(vo);
+ vo->want_redraw = true;
+ }
+ return r;
}
const struct vo_driver video_out_xv = {
@@ -974,6 +961,5 @@ const struct vo_driver video_out_xv = {
.draw_image = draw_image,
.draw_osd = draw_osd,
.flip_page = flip_page,
- .check_events = check_events,
.uninit = uninit
};