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

@ -17,6 +17,8 @@
const std = @import("std");
const server = &@import("../main.zig").server;
const Error = @import("../command.zig").Error;
const PhysicalDirection = @import("../command.zig").PhysicalDirection;
const Orientation = @import("../command.zig").Orientation;
@ -61,7 +63,7 @@ pub fn snap(
return Error.InvalidPhysicalDirection;
const view = getView(seat) orelse return;
const border_width = @intCast(i32, view.output.root.server.config.border_width);
const border_width = @intCast(i32, server.config.border_width);
const output_box = view.output.getEffectiveResolution();
switch (direction) {
.up => view.pending.box.y = border_width,
@ -89,7 +91,7 @@ pub fn resize(
return Error.InvalidOrientation;
const view = getView(seat) orelse return;
const border_width = @intCast(i32, view.output.root.server.config.border_width);
const border_width = @intCast(i32, server.config.border_width);
const output_box = view.output.getEffectiveResolution();
switch (orientation) {
.horizontal => {