aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index c820e032..b4352c6a 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -293,12 +293,10 @@ static void handle_inhibit_deactivate(struct wl_listener *listener, void *data)
293 struct sway_seat *seat; 293 struct sway_seat *seat;
294 wl_list_for_each(seat, &input_manager->seats, link) { 294 wl_list_for_each(seat, &input_manager->seats, link) {
295 seat_set_exclusive_client(seat, NULL); 295 seat_set_exclusive_client(seat, NULL);
296 struct sway_container *previous = seat_get_focus(seat); 296 struct sway_node *previous = seat_get_focus(seat);
297 if (previous) { 297 if (previous) {
298 wlr_log(WLR_DEBUG, "Returning focus to %p %s '%s'", previous,
299 container_type_to_str(previous->type), previous->name);
300 // Hack to get seat to re-focus the return value of get_focus 298 // Hack to get seat to re-focus the return value of get_focus
301 seat_set_focus(seat, previous->parent); 299 seat_set_focus(seat, NULL);
302 seat_set_focus(seat, previous); 300 seat_set_focus(seat, previous);
303 } 301 }
304 } 302 }
@@ -369,10 +367,10 @@ struct sway_input_manager *input_manager_create(
369} 367}
370 368
371bool input_manager_has_focus(struct sway_input_manager *input, 369bool input_manager_has_focus(struct sway_input_manager *input,
372 struct sway_container *container) { 370 struct sway_node *node) {
373 struct sway_seat *seat = NULL; 371 struct sway_seat *seat = NULL;
374 wl_list_for_each(seat, &input->seats, link) { 372 wl_list_for_each(seat, &input->seats, link) {
375 if (seat_get_focus(seat) == container) { 373 if (seat_get_focus(seat) == node) {
376 return true; 374 return true;
377 } 375 }
378 } 376 }
@@ -381,10 +379,10 @@ bool input_manager_has_focus(struct sway_input_manager *input,
381} 379}
382 380
383void input_manager_set_focus(struct sway_input_manager *input, 381void input_manager_set_focus(struct sway_input_manager *input,
384 struct sway_container *container) { 382 struct sway_node *node) {
385 struct sway_seat *seat; 383 struct sway_seat *seat;
386 wl_list_for_each(seat, &input->seats, link) { 384 wl_list_for_each(seat, &input->seats, link) {
387 seat_set_focus(seat, container); 385 seat_set_focus(seat, node);
388 } 386 }
389} 387}
390 388