summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-02 02:06:54 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-07-05 00:25:42 +0200
commit59f456cdd370e81d0681661303ebdd2289f2d5ee (patch)
tree203a7ef3224aa8440e9c1a2dc38d73025ac1730d
parent0e35c230f426c14412c4af14838943b26fc898e8 (diff)
downloadmpv-59f456cdd370e81d0681661303ebdd2289f2d5ee.tar.bz2
mpv-59f456cdd370e81d0681661303ebdd2289f2d5ee.tar.xz
x11: clear window only on initial map
Apparently clearing on every map can cause problems with vdpau when switching virtual desktops and such. This was observed with at least XMonad and nvidia-340.17. It's not observed on some other setups without XMonad. It's not clear why this happens. Normally, the window background is not saved, so clearing should have no additional affect. It's a complete mystery. Possible, the use of legacy X drawing commands (used to clear the window) interferes with vdpau operation in non-trivial ways. Work this around by clearing on initial map only. This probably only hides the underlying issue, but good enough. Closes #897. CC: @mpv-player/stable
-rw-r--r--video/out/x11_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 56ee4833fb..eb4fb158f8 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -858,8 +858,9 @@ int vo_x11_check_events(struct vo *vo)
get_mods(Event.xbutton.state) | MP_KEY_STATE_UP);
break;
case MapNotify:
+ if (x11->window_hidden)
+ vo_x11_clearwindow(vo, x11->window);
x11->window_hidden = false;
- vo_x11_clearwindow(vo, x11->window);
vo_x11_update_geometry(vo);
break;
case DestroyNotify: