aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-03 17:03:29 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-04 18:47:48 -0400
commitb7e779491232b825f6edc0b199e7564e93f1e332 (patch)
tree00457213fa57ec07692bb093392a83203e0e9960 /sway/input/input-manager.c
parentAdd input inhibitor to input manager (diff)
downloadsway-b7e779491232b825f6edc0b199e7564e93f1e332.tar.gz
sway-b7e779491232b825f6edc0b199e7564e93f1e332.tar.zst
sway-b7e779491232b825f6edc0b199e7564e93f1e332.zip
Implement input-inhibit in sway, swaylock
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 3b2d1d55..f71a06e4 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -279,6 +279,14 @@ static void handle_inhibit_deactivate(struct wl_listener *listener, void *data)
279 struct sway_seat *seat; 279 struct sway_seat *seat;
280 wl_list_for_each(seat, &input_manager->seats, link) { 280 wl_list_for_each(seat, &input_manager->seats, link) {
281 seat_set_exclusive_client(seat, NULL); 281 seat_set_exclusive_client(seat, NULL);
282 struct sway_container *previous = seat_get_focus(seat);
283 if (previous) {
284 wlr_log(L_DEBUG, "Returning focus to %p %s '%s'", previous,
285 container_type_to_str(previous->type), previous->name);
286 // Hack to get seat to re-focus the return value of get_focus
287 seat_set_focus(seat, previous->parent);
288 seat_set_focus(seat, previous);
289 }
282 } 290 }
283} 291}
284 292