build: update to Zig 0.15
This commit is contained in:
@ -167,7 +167,7 @@ previous_tags: u32 = 1 << 0,
|
||||
attach_mode: ?Config.AttachMode = null,
|
||||
|
||||
/// List of all layouts
|
||||
layouts: std.DoublyLinkedList(Layout) = .{},
|
||||
layouts: wl.list.Head(Layout, .link),
|
||||
|
||||
/// The current layout namespace of the output. If null,
|
||||
/// config.default_layout_namespace should be used instead.
|
||||
@ -290,9 +290,12 @@ pub fn create(wlr_output: *wlr.Output) !void {
|
||||
.height = height,
|
||||
},
|
||||
.status = undefined,
|
||||
.layouts = undefined,
|
||||
};
|
||||
wlr_output.data = output;
|
||||
|
||||
output.layouts.init();
|
||||
|
||||
output.pending.focus_stack.init();
|
||||
output.pending.wm_stack.init();
|
||||
output.inflight.focus_stack.init();
|
||||
@ -416,7 +419,7 @@ fn handleDestroy(listener: *wl.Listener(*wlr.Output), _: *wlr.Output) void {
|
||||
assert(output.inflight.focus_stack.empty());
|
||||
assert(output.inflight.wm_stack.empty());
|
||||
assert(output.inflight.layout_demand == null);
|
||||
assert(output.layouts.len == 0);
|
||||
assert(output.layouts.length() == 0);
|
||||
|
||||
output.all_link.remove();
|
||||
|
||||
@ -452,7 +455,7 @@ fn handleRequestState(listener: *wl.Listener(*wlr.Output.event.RequestState), ev
|
||||
// TODO double buffer output state changes for frame perfection and cleaner code.
|
||||
// Schedule a frame and commit in the frame handler.
|
||||
// Get rid of this function.
|
||||
pub fn applyState(output: *Output, state: *wlr.Output.State) error{CommitFailed}!void {
|
||||
pub fn applyState(output: *Output, state: *const wlr.Output.State) error{CommitFailed}!void {
|
||||
|
||||
// We need to be precise about this state change to make assertions
|
||||
// in updateLockRenderStateOnEnableDisable() possible.
|
||||
@ -619,7 +622,7 @@ fn handlePresent(
|
||||
}
|
||||
|
||||
fn setTitle(output: Output) void {
|
||||
const title = fmt.allocPrintZ(util.gpa, "river - {s}", .{output.wlr_output.name}) catch return;
|
||||
const title = fmt.allocPrintSentinel(util.gpa, "river - {s}", .{output.wlr_output.name}, 0) catch return;
|
||||
defer util.gpa.free(title);
|
||||
if (output.wlr_output.isWl()) {
|
||||
output.wlr_output.wlSetTitle(title);
|
||||
@ -631,9 +634,9 @@ fn setTitle(output: Output) void {
|
||||
pub fn handleLayoutNamespaceChange(output: *Output) void {
|
||||
// The user changed the layout namespace of this output. Try to find a
|
||||
// matching layout.
|
||||
var it = output.layouts.first;
|
||||
output.layout = while (it) |node| : (it = node.next) {
|
||||
if (mem.eql(u8, output.layoutNamespace(), node.data.namespace)) break &node.data;
|
||||
var it = output.layouts.iterator(.forward);
|
||||
output.layout = while (it.next()) |layout| {
|
||||
if (mem.eql(u8, output.layoutNamespace(), layout.namespace)) break layout;
|
||||
} else null;
|
||||
server.root.applyPending();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user