From 4c88d429292784480dbd6342d978669bd3d4bf52 Mon Sep 17 00:00:00 2001 From: Harrison DiAmbrosio Date: Fri, 5 Dec 2025 21:10:34 -0500 Subject: [PATCH] layers mostly implemented --- runtime/share/mezzaluna/init.lua | 4 +--- src/LayerSurface.zig | 7 ++++--- src/Output.zig | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/runtime/share/mezzaluna/init.lua b/runtime/share/mezzaluna/init.lua index d9d12c8..11c8163 100644 --- a/runtime/share/mezzaluna/init.lua +++ b/runtime/share/mezzaluna/init.lua @@ -12,9 +12,7 @@ package.path = package.path..";"..mez.fs.joinpath(env_conf, "mez", "lua", "?.lua mez.hook.add("ViewPointerMotion", { callback = function (view_id, cursor_x, cursor_y) - print("cursor_x: " .. cursor_x) - print("cursor_y: " .. cursor_y) - print("view_name: ") + mez.view.set_focused(view_id) end }) diff --git a/src/LayerSurface.zig b/src/LayerSurface.zig index b248229..6ddb071 100644 --- a/src/LayerSurface.zig +++ b/src/LayerSurface.zig @@ -30,13 +30,14 @@ pub fn init(wlr_layer_surface: *wlr.LayerSurfaceV1) *LayerSurface { .wlr_layer_surface = wlr_layer_surface, .scene_layer_surface = undefined, }; + // try server.root.scene.tree.createSceneLayerSurfaceV1(wlr_layer_surface) if(server.seat.focused_output) |output| { self.scene_layer_surface = switch (wlr_layer_surface.current.layer) { .background => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), - .bottom => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), - .top => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), - .overlay => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), + .bottom => try output.layers.bottom.createSceneLayerSurfaceV1(wlr_layer_surface), + .top => try output.layers.top.createSceneLayerSurfaceV1(wlr_layer_surface), + .overlay => try output.layers.overlay.createSceneLayerSurfaceV1(wlr_layer_surface), else => { std.log.err("New layer surface of unidentified type", .{}); unreachable; diff --git a/src/Output.zig b/src/Output.zig index e0f0283..0a883cb 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -5,8 +5,6 @@ const zwlr = @import("wayland").server.zwlr; const wlr = @import("wlroots"); const std = @import("std"); - - const Server = @import("Server.zig"); const Utils = @import("Utils.zig"); const View = @import("View.zig");