implement input_inhibit protocol, needed for swaylock

this is in "it appears to work" state, though I blindly copy-pasted a little
more code than I'm happy with, so might benefit from a review
This commit is contained in:
Daniel Barlow 2021-08-21 17:12:02 +01:00
parent 65f5bf189d
commit 39b1d92f9b
7 changed files with 212 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;
@ -369,4 +374,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 */