mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xwayland: wrong expecting_event
According to https://wayland.app/protocols/wayland#wl_seat:event:capabilities Compositor might send capabilities when its capabilities change. Decrease expecting_event here without any check might cause a negative expecting_count. Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2123> (cherry picked from commit 6bf6a9bff293fc1b26024d27d444829c945d3f0e)
This commit is contained in:
committed by
Alan Coopersmith
parent
a9ee6b7326
commit
6a37e21ca4
@@ -1924,7 +1924,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat,
|
||||
release_touch(xwl_seat);
|
||||
}
|
||||
|
||||
xwl_seat->xwl_screen->expecting_event--;
|
||||
if (xwl_seat->caps_initialized == FALSE) {
|
||||
xwl_seat->caps_initialized = TRUE;
|
||||
xwl_seat->xwl_screen->expecting_event--;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1975,6 +1978,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version
|
||||
wl_registry_bind(xwl_screen->registry, id,
|
||||
&wl_seat_interface, min(version, seat_version));
|
||||
xwl_seat->id = id;
|
||||
xwl_seat->caps_initialized = FALSE;
|
||||
|
||||
xwl_cursor_init(&xwl_seat->cursor, xwl_seat->xwl_screen,
|
||||
xwl_seat_update_cursor);
|
||||
|
||||
@@ -77,6 +77,7 @@ struct xwl_seat {
|
||||
uint32_t id;
|
||||
uint32_t pointer_enter_serial;
|
||||
uint8_t pointer_enter_count;
|
||||
Bool caps_initialized;
|
||||
struct xorg_list link;
|
||||
CursorPtr x_cursor;
|
||||
OsTimerPtr x_cursor_timer;
|
||||
|
||||
Reference in New Issue
Block a user