changeset 32368:ff2204a57cd3

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]
author reimar
date Sat, 09 Oct 2010 11:17:28 +0000
parents 4a890f542e69
children b2447ebbcc01
files libvo/video_out.h libvo/x11_common.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/video_out.h	Sat Oct 09 11:12:53 2010 +0000
+++ b/libvo/video_out.h	Sat Oct 09 11:17:28 2010 +0000
@@ -34,6 +34,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 */
--- a/libvo/x11_common.c	Sat Oct 09 11:12:53 2010 +0000
+++ b/libvo/x11_common.c	Sat Oct 09 11:17:28 2010 +0000
@@ -797,10 +797,14 @@
 static int check_resize(void)
 {
     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();
     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(Display * mydisplay)