summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-02 02:06:54 +0200
committerwm4 <wm4@nowhere>2014-07-02 02:07:06 +0200
commit6d38ad14108adb63c3bcf5f09d8492162013c0fb (patch)
tree9c7f70a811ca19687cc4ee1c691b30d30a1d7b0f /video/out/x11_common.c
parent4b5fbb3ee0fce465de56d8484e969467e8fbe85a (diff)
downloadmpv-6d38ad14108adb63c3bcf5f09d8492162013c0fb.tar.bz2
mpv-6d38ad14108adb63c3bcf5f09d8492162013c0fb.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
Diffstat (limited to 'video/out/x11_common.c')
-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: