diff options
author | wm4 <wm4@nowhere> | 2014-05-15 23:52:27 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-15 23:56:14 +0200 |
commit | 8f29f6fc61c7a7026313a02ebda00f247a57378e (patch) | |
tree | ee14519a00a970671b76e7eea0f1feb27ba78531 /video | |
parent | 9bfe3f394c14b3d5cdae5bfff565a1e6fae94315 (diff) | |
download | mpv-8f29f6fc61c7a7026313a02ebda00f247a57378e.tar.bz2 mpv-8f29f6fc61c7a7026313a02ebda00f247a57378e.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/x11_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |