Add Root struct

Server handles listening for wayland signals. It delegates input handling
to Seat and output handling to Root.
This commit is contained in:
Isaac Freund
2020-03-25 15:59:24 +01:00
parent a3eb33a7b1
commit 34e47360f5
6 changed files with 114 additions and 87 deletions

View File

@ -89,7 +89,7 @@ pub const Cursor = struct {
.resize_edges = 0,
};
c.wlr_cursor_attach_output_layout(cursor.wlr_cursor, seat.server.wlr_output_layout);
c.wlr_cursor_attach_output_layout(cursor.wlr_cursor, seat.server.root.wlr_output_layout);
_ = c.wlr_xcursor_manager_load(cursor.wlr_xcursor_manager, 1);
return cursor;
@ -184,7 +184,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.desktop_view_at(
const view = self.seat.server.root.viewAt(
self.wlr_cursor.x,
self.wlr_cursor.y,
&opt_surface,
@ -278,7 +278,7 @@ pub const Cursor = struct {
var sy: f64 = undefined;
var surface: ?*c.wlr_surface = null;
const view = cursor.seat.server.desktop_view_at(
const view = cursor.seat.server.root.viewAt(
cursor.wlr_cursor.x,
cursor.wlr_cursor.y,
&surface,