Root: fix faulty assertion, cleanup

Thanks to tiosgz for prompting me to look at this more closely.

There doesn't seem to be any compelling reason to use the
wlr_scene_output_layout helper, it's simpler to just make the two
necessary SceneOutput.setPosition() calls manually. This will hopefully
be refactored down to a single call eventually as well.
This commit is contained in:
Isaac Freund
2023-12-05 00:40:54 +01:00
parent 1dc1ac02bc
commit d207e08dab
2 changed files with 11 additions and 12 deletions

View File

@ -40,6 +40,7 @@ const View = @import("View.zig");
const log = std.log.scoped(.output);
wlr_output: *wlr.Output,
scene_output: *wlr.SceneOutput,
/// For Root.all_outputs
all_link: wl.list.Link,
@ -221,11 +222,14 @@ pub fn create(wlr_output: *wlr.Output) !void {
var height: c_int = undefined;
wlr_output.effectiveResolution(&width, &height);
const scene_output = try server.root.scene.createSceneOutput(wlr_output);
const tree = try server.root.layers.outputs.createSceneTree();
const normal_content = try tree.createSceneTree();
output.* = .{
.wlr_output = wlr_output,
.scene_output = scene_output,
.all_link = undefined,
.active_link = undefined,
.tree = tree,