aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-03 12:50:05 -0400
committerDrew DeVault <sir@cmpwn.com>2018-04-03 15:09:53 -0400
commit56deff41b6c2c6190894068994ba403978068bad (patch)
treea6d15024dd3101e918cdedad4a26084e4dbacf1f /include
parent3a8c7f283d042abb88aef225f3631ff4f35d57c0 (diff)
Implement input inhibit in rootston
Diffstat (limited to 'include')
-rw-r--r--include/backend/libinput.h2
-rw-r--r--include/rootston/desktop.h2
-rw-r--r--include/rootston/seat.h9
-rw-r--r--include/wlr/backend.h2
-rw-r--r--include/wlr/types/wlr_seat.h3
5 files changed, 15 insertions, 3 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h
index f828c310..4eee7eb8 100644
--- a/include/backend/libinput.h
+++ b/include/backend/libinput.h
@@ -29,6 +29,8 @@ struct wlr_libinput_input_device {
struct libinput_device *handle;
};
+uint32_t usec_to_msec(uint64_t usec);
+
void wlr_libinput_event(struct wlr_libinput_backend *state,
struct libinput_event *event);
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index d07cb99b..f150147b 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -59,6 +59,8 @@ struct roots_desktop {
struct wl_listener wl_shell_surface;
struct wl_listener layer_shell_surface;
struct wl_listener decoration_new;
+ struct wl_listener input_inhibit_activate;
+ struct wl_listener input_inhibit_deactivate;
#ifdef WLR_HAS_XWAYLAND
struct wlr_xwayland *xwayland;
diff --git a/include/rootston/seat.h b/include/rootston/seat.h
index 6f482723..d2ef90f3 100644
--- a/include/rootston/seat.h
+++ b/include/rootston/seat.h
@@ -19,6 +19,9 @@ struct roots_seat {
// If the focused layer is set, views cannot receive keyboard focus
struct wlr_layer_surface *focused_layer;
+ // If non-null, only this client can receive input events
+ struct wl_client *exclusive_client;
+
struct wl_list views; // roots_seat_view::link
bool has_focus;
@@ -125,4 +128,10 @@ void roots_drag_icon_update_position(struct roots_drag_icon *icon);
void roots_drag_icon_damage_whole(struct roots_drag_icon *icon);
+void roots_seat_set_exclusive_client(struct roots_seat *seat,
+ struct wl_client *client);
+
+bool roots_seat_allow_input(struct roots_seat *seat,
+ struct wl_resource *resource);
+
#endif
diff --git a/include/wlr/backend.h b/include/wlr/backend.h
index e3b14add..f5482e04 100644
--- a/include/wlr/backend.h
+++ b/include/wlr/backend.h
@@ -46,6 +46,4 @@ struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend);
*/
struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend);
-uint32_t usec_to_msec(uint64_t usec);
-
#endif
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index 124c1cb8..4c7e34b9 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -530,6 +530,7 @@ bool wlr_seat_touch_has_grab(struct wlr_seat *seat);
*/
bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial);
-struct wlr_seat_client *wlr_seat_client_from_resource(struct wl_resource *resource);
+struct wlr_seat_client *wlr_seat_client_from_resource(
+ struct wl_resource *resource);
#endif