Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/177'
Browse files Browse the repository at this point in the history
* upstream/pull/177
  ivi-input-controller: end grab of all devices when destroy a seat

  Reviewed-by: Eugen Friedrich <[email protected]>
  Reviewed-by: Harsha M M <[email protected]>
  • Loading branch information
Eugen Friedrich committed Oct 29, 2023
2 parents 4ad0b32 + 1275b85 commit a6931f0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,21 @@ destroy_input_context(struct input_context *ctx)
struct wl_resource *resource, *tmp_resource;

wl_list_for_each_safe(seat, tmp, &ctx->seat_list, seat_node) {
/* The ivi-input-controller destroys a seat proactively, need to
* end grab of all devices. Avoid the weston call them later*/
if (seat->keyboard_grab.keyboard) {
keyboard_grab_cancel(&seat->keyboard_grab);
weston_keyboard_end_grab(seat->keyboard_grab.keyboard);
}
if (seat->pointer_grab.pointer) {
pointer_grab_cancel(&seat->pointer_grab);
weston_pointer_end_grab(seat->pointer_grab.pointer);
}
if (seat->touch_grab.touch) {
touch_grab_cancel(&seat->touch_grab);
weston_touch_end_grab(seat->touch_grab.touch);
}

destroy_seat(seat);
}

Expand Down

0 comments on commit a6931f0

Please sign in to comment.