mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 04:57:32 -04:00
cleanup ordering of output code and remove duplicate call to add to the
output_layout
This commit is contained in:
parent
cb947c15e3
commit
db3020f370
2 changed files with 2 additions and 7 deletions
|
|
@ -37,10 +37,6 @@ pub fn create(wlr_output: *wlr.Output) *Output {
|
||||||
|
|
||||||
std.log.debug("adding output: {s}", .{output.wlr_output.name});
|
std.log.debug("adding output: {s}", .{output.wlr_output.name});
|
||||||
|
|
||||||
// I don't think we need the result of this
|
|
||||||
const layout_output = try server.root.output_layout.addAuto(wlr_output);
|
|
||||||
server.root.scene_output_layout.addOutput(layout_output, output.scene_output);
|
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@ pub fn init(self: *Root) void {
|
||||||
.scene_output_layout = try scene.attachOutputLayout(output_layout),
|
.scene_output_layout = try scene.attachOutputLayout(output_layout),
|
||||||
.views = .init(gpa)
|
.views = .init(gpa)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *Root) void {
|
pub fn deinit(self: *Root) void {
|
||||||
|
|
@ -56,7 +54,8 @@ pub fn deinit(self: *Root) void {
|
||||||
|
|
||||||
pub fn addOutput(self: *Root, new_output: *Output) void {
|
pub fn addOutput(self: *Root, new_output: *Output) void {
|
||||||
errdefer Utils.oomPanic();
|
errdefer Utils.oomPanic();
|
||||||
_ = try self.output_layout.addAuto(new_output.wlr_output);
|
const layout_output = try self.output_layout.addAuto(new_output.wlr_output);
|
||||||
|
self.scene_output_layout.addOutput(layout_output, new_output.scene_output);
|
||||||
server.seat.focusOutput(new_output);
|
server.seat.focusOutput(new_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue