From 0f52f664f22c81e3971cfbf62d0f2f6da90c98f1 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 12 Apr 2020 22:19:48 +0200 Subject: Introduce InputManager for eventual multi-seat --- src/cursor.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/cursor.zig') diff --git a/src/cursor.zig b/src/cursor.zig index e867a17..af41c77 100644 --- a/src/cursor.zig +++ b/src/cursor.zig @@ -2,7 +2,6 @@ const std = @import("std"); const c = @import("c.zig"); const Seat = @import("seat.zig").Seat; -const Server = @import("server.zig").Server; const View = @import("view.zig").View; const CursorMode = enum { @@ -52,7 +51,7 @@ pub const Cursor = struct { self.wlr_xcursor_manager = c.wlr_xcursor_manager_create(null, 24) orelse return error.CantCreateWlrXCursorManager; - c.wlr_cursor_attach_output_layout(self.wlr_cursor, seat.server.root.wlr_output_layout); + c.wlr_cursor_attach_output_layout(self.wlr_cursor, seat.input_manager.server.root.wlr_output_layout); _ = c.wlr_xcursor_manager_load(self.wlr_xcursor_manager, 1); self.mode = CursorMode.Passthrough; @@ -166,7 +165,7 @@ pub const Cursor = struct { var sx: f64 = undefined; var sy: f64 = undefined; var opt_surface: ?*c.wlr_surface = null; - const view = self.seat.server.root.viewAt( + const view = self.seat.input_manager.server.root.viewAt( self.wlr_cursor.x, self.wlr_cursor.y, &opt_surface, @@ -260,7 +259,7 @@ pub const Cursor = struct { var sy: f64 = undefined; var surface: ?*c.wlr_surface = null; - const view = cursor.seat.server.root.viewAt( + const view = cursor.seat.input_manager.server.root.viewAt( cursor.wlr_cursor.x, cursor.wlr_cursor.y, &surface, -- cgit v1.2.3