seat focus on button press

This commit is contained in:
Tony Crisci 2017-12-10 11:11:47 -05:00
parent 0fdecb4d3a
commit 21626e8153
7 changed files with 90 additions and 4 deletions

View file

@ -27,7 +27,7 @@ static struct sway_seat *input_manager_get_seat(
}
}
seat = sway_seat_create(input->server->wl_display, seat_name);
seat = sway_seat_create(input, seat_name);
list_add(input->seats, seat);
return seat;
@ -131,3 +131,15 @@ char *libinput_dev_unique_id(struct libinput_device *device) {
free(name);
return identifier;
}
bool sway_input_manager_swayc_has_focus(struct sway_input_manager *input,
swayc_t *container) {
for (int i = 0; i < input->seats->length; ++i) {
struct sway_seat *seat = input->seats->items[i];
if (seat->focus == container) {
return true;
}
}
return false;
}