diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 9540fd96b6..db967577a3 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -77,6 +77,7 @@ struct priv { XVisualInfo vinfo; int current_buf; + bool reset_view; #if HAVE_SHM && HAVE_XEXT int Shmem_Flag; @@ -268,8 +269,7 @@ static bool resize(struct vo *vo) if (mp_sws_reinit(p->sws) < 0) return false; - XFillRectangle(x11->display, x11->window, p->gc, 0, 0, vo->dwidth, vo->dheight); - + p->reset_view = true; vo->want_redraw = true; return true; } @@ -280,6 +280,11 @@ static void Display_Image(struct priv *p, XImage *myximage) XImage *x_image = p->myximage[p->current_buf]; + if (p->reset_view) { + XFillRectangle(vo->x11->display, vo->x11->window, p->gc, 0, 0, vo->dwidth, vo->dheight); + p->reset_view = false; + } + #if HAVE_SHM && HAVE_XEXT if (p->Shmem_Flag) { XShmPutImage(vo->x11->display, vo->x11->window, p->gc, x_image,