mirror of
https://github.com/mpv-player/mpv.git
synced 2026-05-07 20:02:49 +00:00
wayland: bump wayland-protocols to 1.25
1.27 would have been nicer but ubuntu 22.04 is on 1.25 so we'll just compromise.
This commit is contained in:
@@ -8,8 +8,6 @@ protocols = [[wl_protocol_dir, 'stable/presentation-time/presentation-time.xml']
|
||||
wl_protocols_source = []
|
||||
wl_protocols_headers = []
|
||||
|
||||
features += {'wayland_protocols_1_24': wayland['deps'][2].version().version_compare('>=1.24')}
|
||||
|
||||
features += {'wayland_protocols_1_27': wayland['deps'][2].version().version_compare('>=1.27')}
|
||||
if features['wayland_protocols_1_27']
|
||||
protocols += [[wl_protocol_dir, 'staging/content-type/content-type-v1.xml'],
|
||||
|
||||
+1
-1
@@ -980,7 +980,7 @@ endif
|
||||
wayland = {
|
||||
'deps': [dependency('wayland-client', version: '>= 1.20.0', required: get_option('wayland')),
|
||||
dependency('wayland-cursor', version: '>= 1.20.0', required: get_option('wayland')),
|
||||
dependency('wayland-protocols', version: '>= 1.15', required: get_option('wayland')),
|
||||
dependency('wayland-protocols', version: '>= 1.25', required: get_option('wayland')),
|
||||
dependency('xkbcommon', version: '>= 0.3.0', required: get_option('wayland'))],
|
||||
'header': cc.has_header('linux/input-event-codes.h', required: get_option('wayland')),
|
||||
'scanner': find_program('wayland-scanner', required: get_option('wayland')),
|
||||
|
||||
@@ -800,7 +800,6 @@ static void surface_handle_leave(void *data, struct wl_surface *wl_surface,
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND_1_22
|
||||
|
||||
static void surface_handle_preferred_buffer_scale(void *data,
|
||||
struct wl_surface *wl_surface,
|
||||
int32_t scale)
|
||||
@@ -828,7 +827,6 @@ static void surface_handle_preferred_buffer_transform(void *data,
|
||||
uint32_t transform)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static const struct wl_surface_listener surface_listener = {
|
||||
@@ -987,7 +985,6 @@ static void handle_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel)
|
||||
mp_input_put_key(wl->vo->input_ctx, MP_KEY_CLOSE_WIN);
|
||||
}
|
||||
|
||||
#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
|
||||
static void handle_configure_bounds(void *data, struct xdg_toplevel *xdg_toplevel,
|
||||
int32_t width, int32_t height)
|
||||
{
|
||||
@@ -995,14 +992,11 @@ static void handle_configure_bounds(void *data, struct xdg_toplevel *xdg_topleve
|
||||
wl->bounded_width = width * wl->scaling;
|
||||
wl->bounded_height = height * wl->scaling;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
|
||||
handle_toplevel_config,
|
||||
handle_toplevel_close,
|
||||
#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
|
||||
handle_configure_bounds,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_31
|
||||
@@ -1176,7 +1170,6 @@ static const struct zwp_linux_dmabuf_v1_listener dmabuf_listener = {
|
||||
dmabuf_format
|
||||
};
|
||||
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_24
|
||||
static void done(void *data,
|
||||
struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1)
|
||||
{
|
||||
@@ -1236,7 +1229,6 @@ static const struct zwp_linux_dmabuf_feedback_v1_listener dmabuf_feedback_listen
|
||||
tranche_formats,
|
||||
tranche_flags,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id,
|
||||
const char *interface, uint32_t ver)
|
||||
@@ -1267,10 +1259,8 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
|
||||
|
||||
if (!strcmp (interface, zwp_linux_dmabuf_v1_interface.name) && (ver >= 4) && found++) {
|
||||
wl->dmabuf = wl_registry_bind(reg, id, &zwp_linux_dmabuf_v1_interface, 4);
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_24
|
||||
wl->dmabuf_feedback = zwp_linux_dmabuf_v1_get_default_feedback(wl->dmabuf);
|
||||
zwp_linux_dmabuf_feedback_v1_add_listener(wl->dmabuf_feedback, &dmabuf_feedback_listener, wl);
|
||||
#endif
|
||||
} else if (!strcmp (interface, zwp_linux_dmabuf_v1_interface.name) && (ver >= 2) && found++) {
|
||||
wl->dmabuf = wl_registry_bind(reg, id, &zwp_linux_dmabuf_v1_interface, 2);
|
||||
zwp_linux_dmabuf_v1_add_listener(wl->dmabuf, &dmabuf_listener, wl);
|
||||
@@ -2397,10 +2387,8 @@ void vo_wayland_uninit(struct vo *vo)
|
||||
if (wl->dmabuf)
|
||||
zwp_linux_dmabuf_v1_destroy(wl->dmabuf);
|
||||
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_24
|
||||
if (wl->dmabuf_feedback)
|
||||
zwp_linux_dmabuf_feedback_v1_destroy(wl->dmabuf_feedback);
|
||||
#endif
|
||||
|
||||
if (wl->seat)
|
||||
wl_seat_destroy(wl->seat);
|
||||
|
||||
@@ -99,8 +99,7 @@ struct vo_wayland_state {
|
||||
|
||||
/* linux-dmabuf */
|
||||
struct zwp_linux_dmabuf_v1 *dmabuf;
|
||||
/* TODO: unvoid this if required wayland protocols is bumped to 1.24+ */
|
||||
void *dmabuf_feedback;
|
||||
struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback;
|
||||
wayland_format *format_map;
|
||||
uint32_t format_size;
|
||||
bool using_dmabuf_wayland;
|
||||
|
||||
@@ -102,7 +102,7 @@ def check_lua(ctx, dependency_identifier):
|
||||
|
||||
def check_wl_protocols(ctx, dependency_identifier):
|
||||
def fn(ctx, dependency_identifier):
|
||||
ret = check_pkg_config_datadir("wayland-protocols", ">= 1.15")
|
||||
ret = check_pkg_config_datadir("wayland-protocols", ">= 1.25")
|
||||
ret = ret(ctx, dependency_identifier)
|
||||
if ret != None:
|
||||
ctx.env.WL_PROTO_DIR = ret.split()[0]
|
||||
|
||||
@@ -544,11 +544,6 @@ video_output_features = [
|
||||
'func': check_pkg_config('wayland-client', '>= 1.20.0',
|
||||
'wayland-cursor', '>= 1.20.0',
|
||||
'xkbcommon', '>= 0.3.0'),
|
||||
} , {
|
||||
'name': 'wayland-protocols-1-24',
|
||||
'desc': 'wayland-protocols version 1.24+',
|
||||
'deps': 'wayland',
|
||||
'func': check_pkg_config('wayland-protocols >= 1.24'),
|
||||
} , {
|
||||
'name': 'wayland-protocols-1-27',
|
||||
'desc': 'wayland-protocols version 1.27+',
|
||||
|
||||
Reference in New Issue
Block a user