]> git.sesse.net Git - vlc/commitdiff
Fixed xcb resize support.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 16 Apr 2009 20:26:48 +0000 (22:26 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 16 Apr 2009 20:28:13 +0000 (22:28 +0200)
Yep, there is some black magic here ;)

modules/video_output/xcb/xcb.c

index db6f0d6555462f2686dfbb90fd12747fac7cd95e..3c52f776d84e3b3e4377059d8450d644f45cf687 100644 (file)
@@ -427,6 +427,8 @@ static int Init (vout_thread_t *vout)
     const xcb_screen_t *screen = p_sys->screen;
     unsigned x, y, width, height;
 
+    I_OUTPUTPICTURES = 0;
+
     /* Determine parent window and size */
     if (vout->b_fullscreen)
     {
@@ -534,8 +536,8 @@ static void Deinit (vout_thread_t *vout)
 {
     vout_sys_t *p_sys = vout->p_sys;
 
-    while (I_OUTPUTPICTURES > 0)
-        PictureDeinit (PP_OUTPUTPICTURE[--I_OUTPUTPICTURES]);
+    for (int i = 0; i < I_OUTPUTPICTURES; i++)
+        PictureDeinit (PP_OUTPUTPICTURE[i]);
 
     xcb_unmap_window (p_sys->conn, p_sys->window);
     xcb_destroy_window (p_sys->conn, p_sys->window);