From fef7b17c348f72f841123669491056e1003ae27d Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 9 Oct 2010 11:17:28 +0000 Subject: x11_common: add VO_EVENT_MOVE Add VO_EVENT_MOVE which is required for VOs that interact directly with hardware like MGA and VIDIX. Patch by Dirk Porezag [porezag yahoo com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32454 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/video_out.h | 1 + libvo/x11_common.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libvo/video_out.h b/libvo/video_out.h index 1bdf74da96..e2ecfd512d 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -36,6 +36,7 @@ #define VO_EVENT_RESIZE 2 #define VO_EVENT_KEYPRESS 4 #define VO_EVENT_REINIT 8 +#define VO_EVENT_MOVE 16 /* Obsolete: VOCTRL_QUERY_VAA 1 */ /* does the device support the required format */ diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 236f65b4c5..ffe5e8120b 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -766,10 +766,14 @@ void vo_x11_uninit(struct vo *vo) static int check_resize(struct vo *vo) { int old_w = vo->dwidth, old_h = vo->dheight; + int old_x = vo->dx, old_y = vo->dy; + int rc = 0; vo_x11_update_geometry(vo); if (vo->dwidth != old_w || vo->dheight != old_h) - return VO_EVENT_RESIZE; - return 0; + rc |= VO_EVENT_RESIZE; + if (vo->dx != old_x || vo->dy != old_y) + rc |= VO_EVENT_MOVE; + return rc; } int vo_x11_check_events(struct vo *vo) -- cgit v1.2.3