aboutsummaryrefslogtreecommitdiff
path: root/rootston/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/input.c')
-rw-r--r--rootston/input.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/rootston/input.c b/rootston/input.c
index 92148b65..e96565e0 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -108,3 +108,17 @@ struct roots_seat *input_seat_from_wlr_seat(struct roots_input *input,
}
return seat;
}
+
+bool input_view_has_focus(struct roots_input *input, struct roots_view *view) {
+ if (!view) {
+ return false;
+ }
+ struct roots_seat *seat;
+ wl_list_for_each(seat, &input->seats, link) {
+ if (seat->focus == view) {
+ return true;
+ }
+ }
+
+ return false;
+}