summaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authorJan Arne Petersen <jpetersen@openismus.com>2013-01-16 21:26:50 +0100
committerKristian Høgsberg <krh@bitplanet.net>2013-02-15 17:02:26 -0500
commita75a789fc1a00bf7625e27993746853cc8634a2e (patch)
tree8be9a7383d1648bf64b018d98b7dbb27aabb8a41 /src/shell.c
parentab2b01429e4295395d312552b041d4c477b709d7 (diff)
text: fix weston key bindings with input methods
Add a struct weston_keyboard, to handle the input method grab. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c
index 9fcce9f..598f286 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -868,8 +868,8 @@ move_surface_to_workspace(struct desktop_shell *shell,
drop_focus_state(shell, from, surface);
wl_list_for_each(seat, &shell->compositor->seat_list, link)
if (seat->has_keyboard &&
- seat->keyboard.focus == &surface->surface)
- wl_keyboard_set_focus(&seat->keyboard, NULL);
+ seat->keyboard.keyboard.focus == &surface->surface)
+ wl_keyboard_set_focus(&seat->keyboard.keyboard, NULL);
weston_surface_damage_below(surface);
}
@@ -3426,6 +3426,7 @@ switcher_destroy(struct switcher *switcher)
{
struct weston_surface *surface;
struct wl_keyboard *keyboard = switcher->grab.keyboard;
+ struct weston_keyboard *weston_keyboard = (struct weston_keyboard *)keyboard;
struct workspace *ws = get_current_workspace(switcher->shell);
wl_list_for_each(surface, &ws->layer.surface_list, layer_link) {
@@ -3438,6 +3439,8 @@ switcher_destroy(struct switcher *switcher)
(struct weston_seat *) keyboard->seat);
wl_list_remove(&switcher->listener.link);
wl_keyboard_end_grab(keyboard);
+ if (weston_keyboard->input_method_resource)
+ keyboard->grab = &weston_keyboard->input_method_grab;
free(switcher);
}
@@ -3608,7 +3611,10 @@ debug_binding_key(struct wl_keyboard_grab *grab, uint32_t time,
}
if (terminate) {
+ struct weston_keyboard *weston_keyboard = (struct weston_keyboard *) grab->keyboard;
wl_keyboard_end_grab(grab->keyboard);
+ if (weston_keyboard->input_method_resource)
+ grab->keyboard->grab = &weston_keyboard->input_method_grab;
free(db);
}
}