diff --git a/libvo/x11_common.c b/libvo/x11_common.c index d8952ff22b..546861ddfc 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -544,8 +544,10 @@ void vo_x11_uninit() if(vo_window!=None){ XClearWindow( mDisplay,vo_window ); if (WinID < 0){ + XEvent xev; XUnmapWindow( mDisplay,vo_window ); XDestroyWindow(mDisplay, vo_window); + do { XNextEvent( mDisplay,&xev ); } while ( xev.type != DestroyNotify || xev.xdestroywindow.event != vo_window ); } vo_window=None; }