From 56078edd65d05c1db1aa5d6e72134499e907063d Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 2 Apr 2018 21:07:46 -0400 Subject: Give exclusive focus to layers above shell layer --- include/sway/input/seat.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index c780a52b..137fcd22 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h @@ -1,6 +1,7 @@ #ifndef _SWAY_INPUT_SEAT_H #define _SWAY_INPUT_SEAT_H +#include #include #include "sway/input/input-manager.h" @@ -28,6 +29,9 @@ struct sway_seat { bool has_focus; struct wl_list focus_stack; // list of containers in focus order + // If the focused layer is set, views cannot receive keyboard focus + struct wlr_layer_surface *focused_layer; + struct wl_listener focus_destroy; struct wl_listener new_container; @@ -57,6 +61,9 @@ void seat_set_focus(struct sway_seat *seat, struct sway_container *container); void seat_set_focus_warp(struct sway_seat *seat, struct sway_container *container, bool warp); +void seat_set_focus_layer(struct sway_seat *seat, + struct wlr_layer_surface *layer); + struct sway_container *seat_get_focus(struct sway_seat *seat); /** -- cgit v1.2.3