mirror of
https://github.com/swaywm/sway.git
synced 2025-11-13 13:29:49 -05:00
seat focus on button press
This commit is contained in:
parent
0fdecb4d3a
commit
21626e8153
7 changed files with 90 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue