mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-30 14:22:07 +00:00
input: Unset focus of seat device when releasing last reference
When the last input device with a certain capability is removed, unset the focus of the seat device associated with the capability. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
d6e1c34405
commit
630bae8672
|
@ -1680,6 +1680,7 @@ weston_seat_release_keyboard(struct weston_seat *seat)
|
|||
{
|
||||
seat->keyboard_device_count--;
|
||||
if (seat->keyboard_device_count == 0) {
|
||||
weston_keyboard_set_focus(seat->keyboard, NULL);
|
||||
seat_send_updated_caps(seat);
|
||||
}
|
||||
}
|
||||
|
@ -1714,6 +1715,10 @@ weston_seat_release_pointer(struct weston_seat *seat)
|
|||
|
||||
seat->pointer_device_count--;
|
||||
if (seat->pointer_device_count == 0) {
|
||||
weston_pointer_set_focus(pointer, NULL,
|
||||
wl_fixed_from_int(0),
|
||||
wl_fixed_from_int(0));
|
||||
|
||||
seat_send_updated_caps(seat);
|
||||
}
|
||||
}
|
||||
|
@ -1746,6 +1751,7 @@ weston_seat_release_touch(struct weston_seat *seat)
|
|||
{
|
||||
seat->touch_device_count--;
|
||||
if (seat->touch_device_count == 0) {
|
||||
weston_touch_set_focus(seat, NULL);
|
||||
seat_send_updated_caps(seat);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue