changeset 31538:09e7a988ab93

Fix resizing with -wid after previous commit.
author reimar
date Thu, 01 Jul 2010 20:00:19 +0000
parents 8e5ba4ae7c36
children b07ed23358af
files libvo/x11_common.c
diffstat 1 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Thu Jul 01 19:59:42 2010 +0000
+++ b/libvo/x11_common.c	Thu Jul 01 20:00:19 2010 +0000
@@ -794,6 +794,16 @@
 static unsigned int mouse_timer;
 static int mouse_waiting_hide;
 
+static int check_resize(void)
+{
+    int old_w = vo_dwidth, old_h = vo_dheight;
+    int old_x = vo_dx,     old_y = vo_dy;
+    vo_x11_update_geometry();
+    if (vo_dwidth != old_w || vo_dheight != old_h || vo_dx != old_x || vo_dy != old_y)
+        return VO_EVENT_RESIZE;
+    return 0;
+}
+
 int vo_x11_check_events(Display * mydisplay)
 {
     int ret = 0;
@@ -810,6 +820,8 @@
         mouse_waiting_hide = 0;
     }
 
+    if (WinID > 0)
+        ret |= check_resize();
     while (XPending(mydisplay))
     {
         XNextEvent(mydisplay, &Event);
@@ -832,13 +844,7 @@
 //         if (vo_fs && Event.xconfigure.width != vo_screenwidth && Event.xconfigure.height != vo_screenheight) break;
                 if (vo_window == None)
                     break;
-                {
-                    int old_w = vo_dwidth, old_h = vo_dheight;
-		    int old_x = vo_dx, old_y = vo_dy;
-                    vo_x11_update_geometry();
-                    if (vo_dwidth != old_w || vo_dheight != old_h || vo_dx != old_x || vo_dy != old_y)
-                        ret |= VO_EVENT_RESIZE;
-                }
+                ret |= check_resize();
                 break;
             case KeyPress:
                 {