aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 502bc0bc..c3eae65c 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -179,6 +179,7 @@ static void seat_send_focus(struct sway_node *node, struct sway_seat *seat) {
179 179
180 seat_keyboard_notify_enter(seat, view->surface); 180 seat_keyboard_notify_enter(seat, view->surface);
181 seat_tablet_pads_notify_enter(seat, view->surface); 181 seat_tablet_pads_notify_enter(seat, view->surface);
182 sway_input_method_relay_set_focus(&seat->im_relay, view->surface);
182 183
183 struct wlr_pointer_constraint_v1 *constraint = 184 struct wlr_pointer_constraint_v1 *constraint =
184 wlr_pointer_constraints_v1_constraint_for_surface( 185 wlr_pointer_constraints_v1_constraint_for_surface(
@@ -562,6 +563,8 @@ struct sway_seat *seat_create(const char *seat_name) {
562 wl_list_init(&seat->keyboard_groups); 563 wl_list_init(&seat->keyboard_groups);
563 wl_list_init(&seat->keyboard_shortcuts_inhibitors); 564 wl_list_init(&seat->keyboard_shortcuts_inhibitors);
564 565
566 sway_input_method_relay_init(seat, &seat->im_relay);
567
565 wl_list_insert(&server.input->seats, &seat->link); 568 wl_list_insert(&server.input->seats, &seat->link);
566 569
567 seatop_begin_default(seat); 570 seatop_begin_default(seat);
@@ -1015,6 +1018,7 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
1015 view_close_popups(last_focus->sway_container->view); 1018 view_close_popups(last_focus->sway_container->view);
1016 } 1019 }
1017 seat_send_unfocus(last_focus, seat); 1020 seat_send_unfocus(last_focus, seat);
1021 sway_input_method_relay_set_focus(&seat->im_relay, NULL);
1018 seat->has_focus = false; 1022 seat->has_focus = false;
1019 return; 1023 return;
1020 } 1024 }