mirror of https://github.com/mpv-player/mpv
x11: clear window on map
vo_x11_map_window() was attempting to clear the window on map. However, it did so immediately after the map request. It probably assumed that the drawing calls for clearing the window would be queued along with the map request, and then executed in the right order. However, this assumption was wrong - the map request first has to go to the window manager (I guess?), so a lot of things happen before the window is even mapped. Fix this by moving the call to the MapNotify message handler, when the window (apparently) becomes really visible. I also tried to set CWBackPixel to black instead, but this seemed to result in flickering on manual resizing.
This commit is contained in:
parent
9bfe3f394c
commit
8f29f6fc61
|
@ -982,6 +982,7 @@ int vo_x11_check_events(struct vo *vo)
|
|||
break;
|
||||
case MapNotify:
|
||||
x11->window_hidden = false;
|
||||
vo_x11_clearwindow(vo, x11->window);
|
||||
vo_x11_update_geometry(vo);
|
||||
x11->vo_hint.win_gravity = x11->old_gravity;
|
||||
XSetWMNormalHints(display, x11->window, &x11->vo_hint);
|
||||
|
@ -1307,7 +1308,6 @@ static void vo_x11_map_window(struct vo *vo, int x, int y, int w, int h)
|
|||
ButtonPressMask | ButtonReleaseMask |
|
||||
PointerMotionMask | LeaveWindowMask);
|
||||
XMapWindow(x11->display, x11->window);
|
||||
vo_x11_clearwindow(vo, x11->window);
|
||||
}
|
||||
|
||||
static void vo_x11_highlevel_resize(struct vo *vo, int x, int y, int w, int h)
|
||||
|
|
Loading…
Reference in New Issue