diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-07-15 13:00:33 -0500 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-07-16 19:03:32 -0700 |
commit | cee82d62865ab5b239935f102c2e1f7868e0fa65 (patch) | |
tree | 4a316c644353a405dc8f234cceb1a7b9f7d0bf5a /desktop-shell | |
parent | ddc2c97d59110c9982f8b0edf0180784b64b95df (diff) | |
download | weston-cee82d62865ab5b239935f102c2e1f7868e0fa65.tar.gz weston-cee82d62865ab5b239935f102c2e1f7868e0fa65.tar.bz2 weston-cee82d62865ab5b239935f102c2e1f7868e0fa65.zip |
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>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/exposay.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c index ea2a3751..e59d17e5 100644 --- a/desktop-shell/exposay.c +++ b/desktop-shell/exposay.c @@ -520,11 +520,14 @@ exposay_set_inactive(struct desktop_shell *shell) { struct weston_seat *seat = shell->exposay.seat; - weston_keyboard_end_grab(seat->keyboard); if (seat->pointer_device_count) weston_pointer_end_grab(seat->pointer); - if (seat->keyboard->input_method_resource) - seat->keyboard->grab = &seat->keyboard->input_method_grab; + + if (!seat->keyboard_device_count) { + weston_keyboard_end_grab(seat->keyboard); + if (seat->keyboard->input_method_resource) + seat->keyboard->grab = &seat->keyboard->input_method_grab; + } return EXPOSAY_LAYOUT_INACTIVE; } |