mirror of
https://github.com/swaywm/sway.git
synced 2025-11-13 13:29:49 -05:00
Implement input-inhibit in sway, swaylock
This commit is contained in:
parent
06fbd51ff5
commit
b7e7794912
8 changed files with 160 additions and 11 deletions
|
|
@ -279,6 +279,14 @@ 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);
|
||||
if (previous) {
|
||||
wlr_log(L_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, previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue