mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
wayland: remove set_user_data from seat_listener
The user_data is passed on add_listener and can later be changed with set_user_data. But because we don't want to change it later and because it is the same object remove the set_user_data call. This might be a copy&paste leftover from the initial draft for the wayland backend.
This commit is contained in:
parent
fa5f1e7800
commit
74d9504b65
@ -444,7 +444,6 @@ static void seat_handle_capabilities(void *data,
|
||||
|
||||
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !wl->input.keyboard) {
|
||||
wl->input.keyboard = wl_seat_get_keyboard(seat);
|
||||
wl_keyboard_set_user_data(wl->input.keyboard, wl);
|
||||
wl_keyboard_add_listener(wl->input.keyboard, &keyboard_listener, wl);
|
||||
}
|
||||
else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && wl->input.keyboard) {
|
||||
@ -453,7 +452,6 @@ static void seat_handle_capabilities(void *data,
|
||||
}
|
||||
if ((caps & WL_SEAT_CAPABILITY_POINTER) && !wl->input.pointer) {
|
||||
wl->input.pointer = wl_seat_get_pointer(seat);
|
||||
wl_pointer_set_user_data(wl->input.pointer, wl);
|
||||
wl_pointer_add_listener(wl->input.pointer, &pointer_listener, wl);
|
||||
}
|
||||
else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && wl->input.pointer) {
|
||||
|
Loading…
Reference in New Issue
Block a user