mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
wayland: don't get data device if wl_seat is null
This commit is contained in:
@@ -1085,10 +1085,10 @@ int vo_wayland_init(struct vo *vo)
|
||||
if (create_xdg_surface(wl))
|
||||
return false;
|
||||
|
||||
if (wl->dnd_devman) {
|
||||
if (wl->dnd_devman && wl->seat) {
|
||||
wl->dnd_ddev = wl_data_device_manager_get_data_device(wl->dnd_devman, wl->seat);
|
||||
wl_data_device_add_listener(wl->dnd_ddev, &data_device_listener, wl);
|
||||
} else {
|
||||
} else if (!wl->dnd_devman) {
|
||||
MP_VERBOSE(wl, "Compositor doesn't support the %s (ver. 3) protocol!\n",
|
||||
wl_data_device_manager_interface.name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user