0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/video/out
wm4 fc04be708c x11: fix race condition when setting aspect when leaving fullscreen
vo_opengl creates a hidden X11 window to probe the OpenGL context. It
must do that before creating a visible window, because VO creation and
VO config are separate phases.

There's a race condition involving the hidden window: when starting with
--fs, and then leaving fullscreen, the unfullscreened window is
sometimes set to the aspect ratio of the hidden window. I'm not sure why
the window size itself uses the correct size (but corrupted by the wrong
aspect), but that's perhaps because the window manager is free to ignore
the size hint while honoring the aspect, or something equally messed up.

It turns out this happens because x11_common.c thinks the size of the
hidden window is the size of the unfullscreened window. This in turn
happens because vo_x11_update_geometry() reads the size of the hidden
window when called in vo_x11_fullscreen() (called from
vo_x11_config_vo_window()) when mapping the fullscreen window. At that
point, the window could be mapped, but not necessarily. If it's not
mapped, it will get the size of the unfullscreened window... I think.

One could fix this by actively waiting until the window is mapped. Try
to pick a less hacky approach instead, and never read the window size
until MapNotify is received.

vo_x11_create_window() needs a hack, because we'd possibly set the VO's
size to 0, resulting e.g. in vdpau to fail initialization. (It'll print
error messages until a proper resize is received.)
2014-02-02 01:35:46 +01:00
..
cocoa cocoa: remove dead code 2014-01-21 23:32:07 +01:00
aspect.c aspect: remove a small ffmpeg dependency 2014-01-22 00:35:52 +01:00
aspect.h vo: merge get rid of vo.aspdat field 2014-01-22 00:35:52 +01:00
bitmap_packer.c bitmap_packer: use printf() for fatal message 2013-12-21 20:50:11 +01:00
bitmap_packer.h
cocoa_common.h cocoa_common: call gl_clear indirectly 2013-09-28 15:08:40 +02:00
cocoa_common.m vo: merge get rid of vo.aspdat field 2014-01-22 00:35:52 +01:00
d3d_shader_yuv.h
d3d_shader_yuv.hlsl vo_direct3d: remove 2ch hack for 10 bit playback 2013-01-13 20:04:14 +01:00
dither.c dither: don't use long double 2013-07-05 20:26:32 +02:00
dither.h gl_video: improve dithering 2013-05-26 16:44:20 +02:00
filter_kernels.c
filter_kernels.h
gl_cocoa.c gl_common: remove unneeded callback 2013-11-14 19:51:40 +01:00
gl_common.c msg: rename mp_msg_log -> mp_msg 2013-12-21 22:13:04 +01:00
gl_common.h m_option: add mp_log callback to OPT_STRING_VALIDATE options 2013-12-21 21:43:16 +01:00
gl_header_fixes.h gl_video: support packed YUV formats with Apple extensions 2013-12-02 09:03:30 +01:00
gl_hwdec_vaglx.c vaapi: mp_msg conversions 2013-12-21 20:50:11 +01:00
gl_hwdec_vda.c vda: fix build on OS X 10.7 2014-01-02 22:45:39 +01:00
gl_hwdec_vdpau.c vdpau: mp_msg conversions 2013-12-21 20:50:11 +01:00
gl_lcms.c gl_lcms: actually acquire mutex 2013-12-22 12:25:51 +01:00
gl_lcms.h video/out: pass along global context 2013-12-21 20:50:10 +01:00
gl_osd.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
gl_osd.h Rename sub.c/.h to osd.c/.h 2013-11-24 14:44:58 +01:00
gl_video_shaders.glsl vo_opengl: add support for rectangle textures 2013-12-01 23:39:13 +01:00
gl_video.c msg: rename mp_msg_log -> mp_msg 2013-12-21 22:13:04 +01:00
gl_video.h vo_opengl: add support for rectangle textures 2013-12-01 23:39:13 +01:00
gl_w32.c gl_common: remove unneeded callback 2013-11-14 19:51:40 +01:00
gl_wayland.c wayland: fix memory leaks 2014-01-08 20:59:40 +01:00
gl_x11.c vo_opengl: don't assume there'a always 1 fbconfig on success 2014-01-21 23:34:02 +01:00
pnm_loader.c
pnm_loader.h
vo_caca.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo_corevideo.c video/out: don't access aspdat in VOs 2014-01-22 00:35:52 +01:00
vo_direct3d.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo_image.c video/out: don't access aspdat in VOs 2014-01-22 00:35:52 +01:00
vo_lavc.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo_null.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo_opengl_old.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo_opengl.c m_option, m_config: mp_msg conversions 2013-12-21 21:05:02 +01:00
vo_sdl.c vo_sdl: fix compilation 2014-01-25 00:26:35 +01:00
vo_vaapi.c video/out: don't access aspdat in VOs 2014-01-22 00:35:52 +01:00
vo_vdpau.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo_wayland.c vo_wayland: silence shadowing warning 2014-01-29 17:16:36 +01:00
vo_x11.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
vo_xv.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo.c video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
vo.h video/out: do remaining config to reconfig replacements 2014-01-24 21:22:25 +01:00
w32_common.c w32_common: Fix extended keys 2014-01-21 00:41:56 +01:00
w32_common.h input: deal with spurious X11 LeaveNotify events 2013-09-01 20:17:51 +02:00
wayland_common.c video/out: simplify monitor aspect handling 2014-01-11 18:58:06 +01:00
wayland_common.h wayland: fix fullscreen & resizing for good 2014-01-07 21:12:24 +01:00
x11_common.c x11: fix race condition when setting aspect when leaving fullscreen 2014-02-02 01:35:46 +01:00
x11_common.h video/out: remove pointless x/y parameter from vo_x11_config_vo_window 2014-01-11 18:58:07 +01:00
x11_icon.bin x11: add window icon 2013-09-01 23:27:33 +02:00