layers mostly implemented

This commit is contained in:
Harrison DiAmbrosio 2025-12-05 21:10:34 -05:00
parent 9186aeecd3
commit 4c88d42929
3 changed files with 5 additions and 8 deletions

View file

@ -12,9 +12,7 @@ package.path = package.path..";"..mez.fs.joinpath(env_conf, "mez", "lua", "?.lua
mez.hook.add("ViewPointerMotion", { mez.hook.add("ViewPointerMotion", {
callback = function (view_id, cursor_x, cursor_y) callback = function (view_id, cursor_x, cursor_y)
print("cursor_x: " .. cursor_x) mez.view.set_focused(view_id)
print("cursor_y: " .. cursor_y)
print("view_name: ")
end end
}) })

View file

@ -30,13 +30,14 @@ pub fn init(wlr_layer_surface: *wlr.LayerSurfaceV1) *LayerSurface {
.wlr_layer_surface = wlr_layer_surface, .wlr_layer_surface = wlr_layer_surface,
.scene_layer_surface = undefined, .scene_layer_surface = undefined,
}; };
// try server.root.scene.tree.createSceneLayerSurfaceV1(wlr_layer_surface) // try server.root.scene.tree.createSceneLayerSurfaceV1(wlr_layer_surface)
if(server.seat.focused_output) |output| { if(server.seat.focused_output) |output| {
self.scene_layer_surface = switch (wlr_layer_surface.current.layer) { self.scene_layer_surface = switch (wlr_layer_surface.current.layer) {
.background => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), .background => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface),
.bottom => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), .bottom => try output.layers.bottom.createSceneLayerSurfaceV1(wlr_layer_surface),
.top => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), .top => try output.layers.top.createSceneLayerSurfaceV1(wlr_layer_surface),
.overlay => try output.layers.background.createSceneLayerSurfaceV1(wlr_layer_surface), .overlay => try output.layers.overlay.createSceneLayerSurfaceV1(wlr_layer_surface),
else => { else => {
std.log.err("New layer surface of unidentified type", .{}); std.log.err("New layer surface of unidentified type", .{});
unreachable; unreachable;

View file

@ -5,8 +5,6 @@ const zwlr = @import("wayland").server.zwlr;
const wlr = @import("wlroots"); const wlr = @import("wlroots");
const std = @import("std"); const std = @import("std");
const Server = @import("Server.zig"); const Server = @import("Server.zig");
const Utils = @import("Utils.zig"); const Utils = @import("Utils.zig");
const View = @import("View.zig"); const View = @import("View.zig");