diff options
author | llyyr <llyyr.public@gmail.com> | 2023-07-10 16:53:12 +0530 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-07-10 13:37:23 +0000 |
commit | a0f1bbddff8492305639b47d33c0be065cc245b0 (patch) | |
tree | 5662ecbafde8c4ea425714d2ea8bc17cec05f367 /video | |
parent | 7beae9ac86e7b501d24e1ee8bd9b2986578d65c7 (diff) | |
download | mpv-a0f1bbddff8492305639b47d33c0be065cc245b0.tar.bz2 mpv-a0f1bbddff8492305639b47d33c0be065cc245b0.tar.xz |
wayland: add xdg_toplevel.wm_capabilities handler
Fixes crash when compositors advertise xdg_toplevel version >= 5
Diffstat (limited to 'video')
-rw-r--r-- | video/out/wayland_common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 9ecef7d00e..9d1e8e8784 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1013,10 +1013,20 @@ static void handle_configure_bounds(void *data, struct xdg_toplevel *xdg_topleve wl->bounded_height = height * wl->scaling; } +#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION +static void handle_wm_capabilities(void *data, struct xdg_toplevel *xdg_toplevel, + struct wl_array *capabilities) +{ +} +#endif + static const struct xdg_toplevel_listener xdg_toplevel_listener = { handle_toplevel_config, handle_toplevel_close, handle_configure_bounds, +#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION + handle_wm_capabilities, +#endif }; #if HAVE_WAYLAND_PROTOCOLS_1_31 |