seat: add cage_seat_get_focus function

This commit is contained in:
Jente Hidskes 2020-07-08 21:57:59 +02:00
parent 2899abf95f
commit 21a8539399
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA
2 changed files with 9 additions and 0 deletions

View file

@ -18,6 +18,14 @@
#include "pointer.h"
#include "seat.h"
struct wlr_surface *
cage_seat_get_focus(struct cg_seat *seat)
{
assert(seat != NULL);
return seat->wlr_seat->keyboard_state.focused_surface;
}
void
cage_seat_add_new_keyboard(struct cg_seat *seat, struct wlr_input_device *device)
{

View file

@ -17,6 +17,7 @@ struct cg_seat {
struct wl_list keyboard_groups; // cg_keyboard_group::link
};
struct wlr_surface *cage_seat_get_focus(struct cg_seat *seat);
void cage_seat_add_new_keyboard(struct cg_seat *seat, struct wlr_input_device *device);
void cage_seat_add_new_pointer(struct cg_seat *seat, struct wlr_input_device *device);
void cage_seat_update_capabilities(struct cg_seat *seat);