Introduce InputManager for eventual multi-seat

This commit is contained in:
Isaac Freund
2020-04-12 22:19:48 +02:00
parent d92c7a5a71
commit 0f52f664f2
6 changed files with 84 additions and 54 deletions

View File

@ -182,7 +182,8 @@ pub const View = struct {
fn focus(self: *Self, surface: *c.wlr_surface) void {
const root = self.output.root;
const wlr_seat = root.server.seat.wlr_seat;
// TODO: remove this hack
const wlr_seat = root.server.input_manager.seats.first.?.data.wlr_seat;
const prev_surface = wlr_seat.keyboard_state.focused_surface;
if (prev_surface == surface) {