uwac/input: Set the right serial when setting cursor

The serial in wl_pointer.set_cursor must exactly match the one from
wl_pointer.enter, it should not use whatever serial for any input class
is the newest.
This commit is contained in:
Jonas Ådahl 2022-11-16 16:56:36 +01:00 коммит произвёл akallabeth
Родитель 3ae79bd72e
Коммит b2cf6f5c2c
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -729,6 +729,7 @@ static void pointer_handle_enter(void* data, struct wl_pointer* pointer, uint32_
}
input->display->serial = serial;
input->display->pointer_focus_serial = serial;
window = wl_surface_get_user_data(surface);
if (window)
window->pointer_enter_serial = serial;
@ -1191,5 +1192,5 @@ UwacReturnCode UwacSeatSetMouseCursor(UwacSeat* seat, const void* data, size_t l
}
if (seat && !seat->default_cursor)
return UWAC_SUCCESS;
return set_cursor_image(seat, seat->display->serial);
return set_cursor_image(seat, seat->display->pointer_focus_serial);
}

Просмотреть файл

@ -121,6 +121,7 @@ struct uwac_display
bool running;
UwacTask dispatch_fd_task;
uint32_t serial;
uint32_t pointer_focus_serial;
struct wl_list windows;