[PATCH weston 2/4] input: Unset focus of seat device when releasing last reference
Jonas Ådahl
jadahl at gmail.com
Thu Oct 17 23:04:06 CEST 2013
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 at gmail.com>
---
src/input.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/input.c b/src/input.c
index a5cad7c..de46433 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1678,6 +1678,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);
}
}
@@ -1712,6 +1713,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);
}
}
@@ -1744,6 +1749,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);
}
}
--
1.8.1.2
More information about the wayland-devel
mailing list