aboutsummaryrefslogtreecommitdiff
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-05 09:33:27 -0400
committerGitHub <noreply@github.com>2018-09-05 09:33:27 -0400
commit610eb946171f782165a20614b2d3318b89273990 (patch)
tree05eec1df1ef48e05b23d273d31143ad32e7632d2 /sway/input/input-manager.c
parentaa2bf98e0442f9bf41a852c2fafee5b0897010a2 (diff)
parentdbf4aa3e33bdee53876c6893b15ac3f224818e7c (diff)
downloadsway-610eb946171f782165a20614b2d3318b89273990.tar.xz
Merge pull request #2540 from RyanDwyer/typesafety
Implement type safe arguments and demote sway_container
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)
struct sway_seat *seat;
wl_list_for_each(seat, &input_manager->seats, link) {
seat_set_exclusive_client(seat, NULL);
- struct sway_container *previous = seat_get_focus(seat);
+ struct sway_node *previous = seat_get_focus(seat);
if (previous) {
- wlr_log(WLR_DEBUG, "Returning focus to %p %s '%s'", previous,
- container_type_to_str(previous->type), previous->name);
// Hack to get seat to re-focus the return value of get_focus
- seat_set_focus(seat, previous->parent);
+ seat_set_focus(seat, NULL);
seat_set_focus(seat, previous);
}
}
@@ -369,10 +367,10 @@ struct sway_input_manager *input_manager_create(
}
bool input_manager_has_focus(struct sway_input_manager *input,
- struct sway_container *container) {
+ struct sway_node *node) {
struct sway_seat *seat = NULL;
wl_list_for_each(seat, &input->seats, link) {
- if (seat_get_focus(seat) == container) {
+ if (seat_get_focus(seat) == node) {
return true;
}
}
@@ -381,10 +379,10 @@ bool input_manager_has_focus(struct sway_input_manager *input,
}
void input_manager_set_focus(struct sway_input_manager *input,
- struct sway_container *container) {
+ struct sway_node *node) {
struct sway_seat *seat;
wl_list_for_each(seat, &input->seats, link) {
- seat_set_focus(seat, container);
+ seat_set_focus(seat, node);
}
}