1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00

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.
This commit is contained in:
Uoti Urpala 2011-04-08 02:21:48 +03:00
parent f06fe7f80e
commit ca5399d04f

View File

@ -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,