exposay: Test keyboard presence before using keyboard pointer
We shouldn't actually use the keyboard pointer unless we check that a keyboard is present. Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
ddc2c97d59
commit
cee82d6286
@@ -520,11 +520,14 @@ exposay_set_inactive(struct desktop_shell *shell)
|
|||||||
{
|
{
|
||||||
struct weston_seat *seat = shell->exposay.seat;
|
struct weston_seat *seat = shell->exposay.seat;
|
||||||
|
|
||||||
weston_keyboard_end_grab(seat->keyboard);
|
|
||||||
if (seat->pointer_device_count)
|
if (seat->pointer_device_count)
|
||||||
weston_pointer_end_grab(seat->pointer);
|
weston_pointer_end_grab(seat->pointer);
|
||||||
|
|
||||||
|
if (!seat->keyboard_device_count) {
|
||||||
|
weston_keyboard_end_grab(seat->keyboard);
|
||||||
if (seat->keyboard->input_method_resource)
|
if (seat->keyboard->input_method_resource)
|
||||||
seat->keyboard->grab = &seat->keyboard->input_method_grab;
|
seat->keyboard->grab = &seat->keyboard->input_method_grab;
|
||||||
|
}
|
||||||
|
|
||||||
return EXPOSAY_LAYOUT_INACTIVE;
|
return EXPOSAY_LAYOUT_INACTIVE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user