1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00
mpv/video/out
wm4 8c002b79d3 x11: if the WM supports _NET_FRAME_EXTENTS, don't wait for map
Some window managers can prevent mapping of a window as a feature. i3
can put new windows on a certain workspace (with "assign"), so if mpv is
started on a different workspace, the window will never be mapped.

mpv currently waits until the window is mapped (blocking almost all of
the player), in order to avoid race conditions regarding the window
size. We don't want to remove this, but on the other hand we also don't
want to block the player forever in these situations.

So what we need is a way to know when the window manager is "done" with
processing the map request. Unfortunately, there doesn't seem to be a
standard way for this. So, instead we could do some arbitrary
communication with the WM, that may act as "barrier" after map request
and the "immediate" mapping of the window. If the window is not mapped
after this barrier, it means the window manager decided to delay the
mapping indefinitely. Use the _NET_REQUEST_FRAME_EXTENTS message as such
a barrier. WMs supporting this message must set the _NET_FRAME_EXTENTS
property on the mpv window, and we receive a PropertyNotify event. If
that happens, we always continue and cancel waiting for the MapNotify
event.

I don't know if this is sane or if there's a better mechanism. Also,
this works only for WMs which support this message, which are not many.
But at least it appears to work on i3. It may reintroduce flickering on
fullscreen with other WMs, though.
2014-09-15 19:19:01 +02:00
..
cocoa cocoa: macosx_application needs cocoa-application 2014-08-06 09:31:59 +02:00
wayland vo_wayland: pixel perfect buffers 2014-09-10 19:10:19 +02:00
aspect.c
aspect.h
bitmap_packer.c
bitmap_packer.h
cocoa_common.h cocoa: move CGL context creation to gl_cocoa 2014-07-08 21:06:57 +02:00
cocoa_common.m video: rename VOCTRL_GET_WINDOW_SIZE 2014-09-05 01:52:16 +02:00
d3d_shader_yuv.h
d3d_shader_yuv.hlsl
dither.c malloc+memset(0) to calloc 2014-09-05 01:59:11 +02:00
dither.h
filter_kernels.c vo_opengl: add parameter to gaussian filter 2014-08-26 22:19:32 +02:00
filter_kernels.h vo_opengl: add radius options for filters 2014-08-26 22:19:30 +02:00
gl_cocoa.c cocoa: fix compilation on OS X 10.8 2014-07-14 07:21:44 +02:00
gl_common.c vo_opengl: don't pass (char*)NULL as %s printf argument 2014-08-28 01:52:15 +02:00
gl_common.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
gl_header_fixes.h
gl_hwdec_vaglx.c vaapi: try dealing with Intel's braindamaged shit drivers 2014-08-21 22:45:58 +02:00
gl_hwdec_vda.c
gl_hwdec_vdpau.c
gl_lcms.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
gl_lcms.h
gl_osd.c
gl_osd.h
gl_video_shaders.glsl vo_opengl: remove macro operator from shader 2014-08-29 20:56:03 +02:00
gl_video.c sanitizer: avoid divide-by-zero instances 2014-09-14 21:07:30 +02:00
gl_video.h vo_opengl: add radius options for filters 2014-08-26 22:19:30 +02:00
gl_w32.c win32: fix build 2014-08-05 23:43:40 +02:00
gl_wayland.c gl_wayland: fix crash after eglInitialze failed 2014-08-30 10:17:51 +02:00
gl_x11.c
pnm_loader.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
pnm_loader.h
vo_caca.c vo: remove vo_mouse_movement() wrapper 2014-07-27 21:53:29 +02:00
vo_direct3d.c vo_direct3d: allow resizing before video init 2014-08-06 20:30:47 +02:00
vo_image.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
vo_lavc.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
vo_null.c
vo_opengl_old.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
vo_opengl.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
vo_sdl.c vo_sdl: fix typo 2014-09-05 22:10:20 +02:00
vo_vaapi.c vaapi: try dealing with Intel's braindamaged shit drivers 2014-08-21 22:45:58 +02:00
vo_vdpau.c video: take refresh rate changes into account 2014-08-17 02:50:59 +02:00
vo_wayland.c vo_wayland: pixel perfect buffers 2014-09-10 19:10:19 +02:00
vo_x11.c malloc+memset(0) to calloc 2014-09-05 01:59:11 +02:00
vo_xv.c vo: different hack for VOs which need to mangle mouse input 2014-07-27 21:33:11 +02:00
vo.c vo_corevideo: remove this VO 2014-09-06 14:10:22 +02:00
vo.h video: rename VOCTRL_GET_WINDOW_SIZE 2014-09-05 01:52:16 +02:00
w32_common.c win32: don't request window size larger than the screen 2014-09-10 00:48:07 +02:00
w32_common.h win32: create OpenGL context on the GUI thread 2014-08-05 20:02:23 +02:00
wayland_common.c wayland_common: fix changing videos when fullscreen 2014-09-10 19:21:52 +02:00
wayland_common.h wayland_common: fix changing videos when fullscreen 2014-09-10 19:21:52 +02:00
win_state.c
win_state.h
x11_common.c x11: if the WM supports _NET_FRAME_EXTENTS, don't wait for map 2014-09-15 19:19:01 +02:00
x11_common.h x11: if the WM supports _NET_FRAME_EXTENTS, don't wait for map 2014-09-15 19:19:01 +02:00
x11_icon.bin