From: Laurent Aimar Date: Thu, 16 Apr 2009 20:26:48 +0000 (+0200) Subject: Fixed xcb resize support. X-Git-Tag: 1.0.0-pre2~7 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=00155d409b3b839f85f7201face93b06a64b56d6;p=vlc Fixed xcb resize support. Yep, there is some black magic here ;) --- diff --git a/modules/video_output/xcb/xcb.c b/modules/video_output/xcb/xcb.c index db6f0d6555..3c52f776d8 100644 --- a/modules/video_output/xcb/xcb.c +++ b/modules/video_output/xcb/xcb.c @@ -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);