summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2014-05-07 11:57:28 +0300
committerKristian Høgsberg <krh@bitplanet.net>2014-05-09 12:51:28 -0700
commit6e56ab41d99197ca2b562b5bc1315800065763ae (patch)
tree6d74b2641414dad69cf09e34baf867afea3eb038 /desktop-shell
parentc3f03f557b49f701c13557f266a57e0aa0ecf310 (diff)
downloadweston-6e56ab41d99197ca2b562b5bc1315800065763ae.tar.gz
shell: Fix crash when restoring focus state during workspace change
The check to avoid calling weston_keyboard_set_focus() for a seat that didn't have a keyboard in restore_focus_state() was cheking the wrong seat (the one from the previous loop). That caused a crash when switching workspaces if there was an extra seat that didn't have a keyboard. https://bugs.freedesktop.org/show_bug.cgi?id=78349
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index fac31209..ea7b3cd7 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -731,7 +731,7 @@ restore_focus_state(struct desktop_shell *shell, struct workspace *ws)
wl_list_for_each_safe(seat, next_seat, &pending_seat_list, link) {
wl_list_insert(&shell->compositor->seat_list, &seat->link);
- if (state->seat->keyboard == NULL)
+ if (seat->keyboard == NULL)
continue;
weston_keyboard_set_focus(seat->keyboard, NULL);