Make Output a toplevel struct

This commit is contained in:
Isaac Freund 2020-05-02 16:40:05 +02:00
parent 7ddcebbbab
commit 96f2ff793c
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
10 changed files with 496 additions and 497 deletions

View file

@ -2,7 +2,7 @@ const c = @import("../c.zig");
const std = @import("std"); const std = @import("std");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Output = @import("../output.zig").Output; const Output = @import("../output.zig");
const Seat = @import("../seat.zig"); const Seat = @import("../seat.zig");
/// Focus either the next or the previous output, depending on the bool passed. /// Focus either the next or the previous output, depending on the bool passed.

View file

@ -2,7 +2,7 @@ const c = @import("../c.zig");
const std = @import("std"); const std = @import("std");
const Arg = @import("../command.zig").Arg; const Arg = @import("../command.zig").Arg;
const Output = @import("../output.zig").Output; const Output = @import("../output.zig");
const Seat = @import("../seat.zig"); const Seat = @import("../seat.zig");
/// Send the focused view to the the next or the previous output, depending on /// Send the focused view to the the next or the previous output, depending on

View file

@ -3,7 +3,7 @@ const c = @import("c.zig");
const LayerSurface = @import("layer_surface.zig").LayerSurface; const LayerSurface = @import("layer_surface.zig").LayerSurface;
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
const Seat = @import("seat.zig"); const Seat = @import("seat.zig");
const View = @import("view.zig").View; const View = @import("view.zig").View;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;

View file

@ -3,7 +3,7 @@ const c = @import("c.zig");
const Box = @import("box.zig"); const Box = @import("box.zig");
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
pub const LayerSurface = struct { pub const LayerSurface = struct {
const Self = @This(); const Self = @This();

View file

@ -1,4 +1,7 @@
const Self = @This();
const std = @import("std"); const std = @import("std");
const c = @import("c.zig"); const c = @import("c.zig");
const render = @import("render.zig"); const render = @import("render.zig");
@ -9,9 +12,6 @@ const Root = @import("root.zig").Root;
const View = @import("view.zig").View; const View = @import("view.zig").View;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;
pub const Output = struct {
const Self = @This();
root: *Root, root: *Root,
wlr_output: *c.wlr_output, wlr_output: *c.wlr_output,
@ -531,7 +531,7 @@ pub const Output = struct {
self.wlr_output.data = null; self.wlr_output.data = null;
// Remove the destroyed output from the list // Remove the destroyed output from the list
const node = @fieldParentPtr(std.TailQueue(Output).Node, "data", self); const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self);
root.outputs.remove(node); root.outputs.remove(node);
root.server.allocator.destroy(node); root.server.allocator.destroy(node);
@ -551,4 +551,3 @@ pub const Output = struct {
self.arrangeLayers(); self.arrangeLayers();
self.root.arrange(); self.root.arrange();
} }
};

View file

@ -3,7 +3,7 @@ const c = @import("c.zig");
const Box = @import("box.zig"); const Box = @import("box.zig");
const LayerSurface = @import("layer_surface.zig").LayerSurface; const LayerSurface = @import("layer_surface.zig").LayerSurface;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
const Server = @import("server.zig"); const Server = @import("server.zig");
const View = @import("view.zig").View; const View = @import("view.zig").View;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;

View file

@ -4,7 +4,7 @@ const util = @import("util.zig");
const Box = @import("box.zig").Box; const Box = @import("box.zig").Box;
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
const Server = @import("server.zig"); const Server = @import("server.zig");
const Seat = @import("seat.zig").Seat; const Seat = @import("seat.zig").Seat;
const View = @import("view.zig").View; const View = @import("view.zig").View;

View file

@ -7,7 +7,7 @@ const Cursor = @import("cursor.zig").Cursor;
const InputManager = @import("input_manager.zig"); const InputManager = @import("input_manager.zig");
const Keyboard = @import("keyboard.zig").Keyboard; const Keyboard = @import("keyboard.zig").Keyboard;
const LayerSurface = @import("layer_surface.zig").LayerSurface; const LayerSurface = @import("layer_surface.zig").LayerSurface;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
const View = @import("view.zig").View; const View = @import("view.zig").View;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;

View file

@ -8,7 +8,7 @@ const Config = @import("config.zig");
const DecorationManager = @import("decoration_manager.zig"); const DecorationManager = @import("decoration_manager.zig");
const InputManager = @import("input_manager.zig"); const InputManager = @import("input_manager.zig");
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
const Root = @import("root.zig").Root; const Root = @import("root.zig").Root;
const View = @import("view.zig").View; const View = @import("view.zig").View;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;

View file

@ -3,7 +3,7 @@ const c = @import("c.zig");
const Box = @import("box.zig"); const Box = @import("box.zig");
const Log = @import("log.zig").Log; const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output; const Output = @import("output.zig");
const Root = @import("root.zig").Root; const Root = @import("root.zig").Root;
const ViewStack = @import("view_stack.zig").ViewStack; const ViewStack = @import("view_stack.zig").ViewStack;
const XdgToplevel = @import("xdg_toplevel.zig"); const XdgToplevel = @import("xdg_toplevel.zig");