summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-10-09 11:17:28 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:18:09 +0200
commitfef7b17c348f72f841123669491056e1003ae27d (patch)
tree0c99fc520d70714060b64637037d5862291f674b
parent107845e9dbe41a3fabf1c440561c10ae302ff5fb (diff)
downloadmpv-fef7b17c348f72f841123669491056e1003ae27d.tar.bz2
mpv-fef7b17c348f72f841123669491056e1003ae27d.tar.xz
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
-rw-r--r--libvo/video_out.h1
-rw-r--r--libvo/x11_common.c8
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)