river: remove Root.server

The server is now global so this is no longer needed.
This commit is contained in:
Isaac Freund
2021-05-13 14:26:27 +02:00
parent 271b1563a8
commit 89e0d4c083
10 changed files with 46 additions and 48 deletions

View File

@ -21,6 +21,7 @@ const std = @import("std");
const wlr = @import("wlroots");
const wl = @import("wayland").server.wl;
const server = &@import("main.zig").server;
const util = @import("util.zig");
const Box = @import("Box.zig");
@ -109,7 +110,7 @@ fn handleUnmap(listener: *wl.Listener(*wlr.LayerSurfaceV1), wlr_layer_surface: *
self.output.layers[@intCast(usize, @enumToInt(self.state.layer))].remove(self_node);
// If the unmapped surface is focused, clear focus
var it = self.output.root.server.input_manager.seats.first;
var it = server.input_manager.seats.first;
while (it) |node| : (it = node.next) {
const seat = &node.data;
if (seat.focused == .layer and seat.focused.layer == self)
@ -122,7 +123,7 @@ fn handleUnmap(listener: *wl.Listener(*wlr.LayerSurfaceV1), wlr_layer_surface: *
// Ensure that focus is given to the appropriate view if there is no
// other top/overlay layer surface to grab focus.
it = self.output.root.server.input_manager.seats.first;
it = server.input_manager.seats.first;
while (it) |node| : (it = node.next) {
const seat = &node.data;
seat.focus(null);