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:
Родитель
3ae79bd72e
Коммит
b2cf6f5c2c
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче