summaryrefslogtreecommitdiffstats
path: root/video/out/vo_x11.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_x11.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_x11.c')
-rw-r--r--video/out/vo_x11.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 973c6e49a9..845679c8f9 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -101,13 +101,6 @@ struct priv {
static bool resize(struct vo *vo);
-static void check_events(struct vo *vo)
-{
- int ret = vo_x11_check_events(vo);
- if (ret & (VO_EVENT_EXPOSE | VO_EVENT_RESIZE))
- resize(vo);
-}
-
/* Scan the available visuals on this Display/Screen. Try to find
* the 'best' available TrueColor visual that has a decent color
* depth (at least 15bit). If there are multiple visuals with depth
@@ -483,7 +476,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
@@ -646,10 +639,6 @@ static int preinit(struct vo *vo, const char *arg)
static int control(struct vo *vo, uint32_t request, void *data)
{
switch (request) {
- case VOCTRL_FULLSCREEN:
- vo_x11_fullscreen(vo);
- resize(vo);
- return VO_TRUE;
case VOCTRL_SET_EQUALIZER:
{
struct voctrl_set_equalizer_args *args = data;
@@ -660,12 +649,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
struct voctrl_get_equalizer_args *args = data;
return vo_x11_get_equalizer(vo, args->name, args->valueptr);
}
- case VOCTRL_ONTOP:
- vo_x11_ontop(vo);
- return VO_TRUE;
- case VOCTRL_UPDATE_SCREENINFO:
- vo_x11_update_screeninfo(vo);
- return VO_TRUE;
case VOCTRL_GET_PANSCAN:
return VO_TRUE;
case VOCTRL_SET_PANSCAN:
@@ -679,7 +662,12 @@ 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);
+ return r;
}
const struct vo_driver video_out_x11 = {
@@ -698,6 +686,5 @@ const struct vo_driver video_out_x11 = {
.draw_image = draw_image,
.draw_osd = draw_osd,
.flip_page = flip_page,
- .check_events = check_events,
.uninit = uninit,
};