From ca5399d04fa14639d2a047f29280e8184b419dcb Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Fri, 8 Apr 2011 02:21:48 +0300 Subject: [PATCH] VO: don't wait for map event in X VO initialization After creating a video window the common X code waited for a MapNotify event before proceeding. This meant that if the window was opened on another workspace the player would be stuck until the user switched to that workspace and the window could become actually visible. Remove this waiting code. I don't know why it was there or if it was actually beneficial/needed for some setup (at least common uses seem to work fine without it); it comes from the earliest MPlayer versions visible in VCS history. --- libvo/x11_common.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libvo/x11_common.c b/libvo/x11_common.c index fa65e19870..f695c11fa9 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1104,10 +1104,6 @@ void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y, // map window XMapWindow(mDisplay, x11->window); vo_x11_clearwindow(vo, x11->window); - // wait for map - do { - XNextEvent(mDisplay, &xev); - } while (xev.type != MapNotify || xev.xmap.event != x11->window); XSelectInput(mDisplay, x11->window, NoEventMask); XSync(mDisplay, False); vo_x11_selectinput_witherr(mDisplay, x11->window,