Merge pull request #54 from telent/lockdown

implement input_inhibit protocol, needed for swaylock
This commit is contained in:
Johan Malm 2021-08-24 21:56:13 +01:00 committed by GitHub
commit 824282dd2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 195 additions and 8 deletions

View file

@ -65,6 +65,7 @@ struct seat {
/* if set, views cannot receive focus */
struct wlr_layer_surface_v1 *focused_layer;
struct wl_client *active_client_while_inhibited;
struct wl_list inputs;
struct wl_listener new_input;
@ -99,6 +100,10 @@ struct server {
struct wl_listener new_xwayland_surface;
#endif
struct wlr_input_inhibit_manager *input_inhibit;
struct wl_listener input_inhibit_activate;
struct wl_listener input_inhibit_deactivate;
struct wl_list views;
struct wl_list unmanaged_surfaces;
@ -345,6 +350,8 @@ void cursor_init(struct seat *seat);
void keyboard_init(struct seat *seat);
void arrange_layers(struct output *output);
void seat_init(struct server *server);
void seat_finish(struct server *server);
void seat_focus_surface(struct seat *seat, struct wlr_surface *surface);
@ -375,4 +382,11 @@ void action(struct server *server, const char *action, const char *command);
/* update onscreen display 'alt-tab' texture */
void osd_update(struct server *server);
/* wlroots "input inhibitor" extension (required for swaylock) blocks
* any client other than the requesting client from receiving events
*/
bool input_inhibit_blocks_surface(struct seat *seat,
struct wl_resource *resource);
#endif /* __LABWC_H */