Skip to content

Commit

Permalink
fix: configure_node_decoration infinite recursion
Browse files Browse the repository at this point in the history
Signed-off-by: Shinyzenith <[email protected]>
  • Loading branch information
Shinyzenith committed Oct 26, 2023
1 parent 3e2402d commit bfc94ad
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion deps/zig-wlroots
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
name = "NextWM-devel";

nativeBuildInputs = with pkgs; [
(callPackage ./scenefx.nix { })
# Compilers
cargo
go
Expand All @@ -30,22 +29,24 @@

# Libs
cairo
mesa
hwdata
libGL
libdrm
libevdev
libinput
libjpeg
libxkbcommon
mesa
pixman
stdenv
udev
wayland
wayland-protocols
wlroots_0_16
(callPackage ./scenefx.nix { })

# Tools
clang-tools
cmake
gdb
gnumake
Expand Down
8 changes: 4 additions & 4 deletions next/Server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ fn setMode(listener: *wl.Listener(*wlr.OutputPowerManagerV1.event.SetMode), even

fn logInfo() void {
const uname_info = std.os.uname();
std.log.info("System name: {s}", .{uname_info.sysname});
std.log.info("Host name: {s}", .{uname_info.nodename});
std.log.info("Release Info: {s}", .{uname_info.release});
std.log.info("Version Info: {s}", .{uname_info.version});
log.info("System name: {s}", .{uname_info.sysname});
log.info("Host name: {s}", .{uname_info.nodename});
log.info("Release Info: {s}", .{uname_info.release});
log.info("Version Info: {s}", .{uname_info.version});
}
6 changes: 3 additions & 3 deletions next/desktop/Output.zig
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ fn configure_node_decoration(self: *Self, node: *wlr.SceneNode) void {
}
}
} else if (node.type == .tree) {
const tree = @fieldParentPtr(wlr.SceneTree, "node", node);
const tree = node.parent orelse return;
var it = tree.children.safeIterator(.forward);
while (it.next()) |scene_node| {
configure_node_decoration(self, scene_node);
self.configure_node_decoration(scene_node);
}
}
}
Expand Down Expand Up @@ -280,7 +280,7 @@ pub fn getDescription(self: *Self) [*:0]const u8 {

pub fn getMake(self: *Self) [*:0]const u8 {
if (self.wlr_output.make) |make| {
return make.*;
return make;
} else {
return "<No output make found>";
}
Expand Down
2 changes: 1 addition & 1 deletion next/next.zig
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub fn main() anyerror!void {
try os.sigaction(os.SIG.PIPE, &sig_ign, null);

// Attempt to initialize the server, deinitialize it once the block ends.
std.log.info("Initializing server", .{});
std.log.scoped(.Next).info("Initializing server", .{});
try server.init();
defer server.deinit();
try server.start();
Expand Down
15 changes: 3 additions & 12 deletions scenefx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,10 @@ stdenv.mkDerivation rec {
hash = "sha256-c/zRWz6njC3RsHzIcWpd5m7CXGprrIhKENpaQVH7Owk=";
};

nativeBuildInputs = [ meson ninja cmake pkg-config ];
nativeBuildInputs = [ wlroots_0_16 meson ninja cmake pkg-config ];

buildInputs = [
wlroots_0_16
wayland
libdrm
libxkbcommon
udev
pixman
wayland-protocols
libGL
mesa
];
buildInputs =
[ wayland libdrm libxkbcommon udev pixman wayland-protocols libGL mesa ];

meta = with lib; {
description =
Expand Down

0 comments on commit bfc94ad

Please sign in to comment.