From 8f29f6fc61c7a7026313a02ebda00f247a57378e Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 15 May 2014 23:52:27 +0200 Subject: 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. --- video/out/x11_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 0779718967..af867ea8d6 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -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) -- cgit v1.2.3