mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 04:57:32 -04:00
removed all windows decorations properly, added window closing and compositor exiting as well as view focusing
This commit is contained in:
parent
f636efdfe9
commit
976900ffa6
11 changed files with 289 additions and 117 deletions
|
|
@ -4,6 +4,7 @@ const zlua = @import("zlua");
|
|||
const gpa = std.heap.c_allocator;
|
||||
|
||||
const env_map = &@import("../main.zig").env_map;
|
||||
const server = &@import("../main.zig").server;
|
||||
|
||||
pub fn spawn(L: *zlua.Lua) i32 {
|
||||
const nargs: i32 = L.getTop();
|
||||
|
|
@ -28,3 +29,31 @@ pub fn spawn(L: *zlua.Lua) i32 {
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
pub fn close(L: *zlua.Lua) i32 {
|
||||
const nargs: i32 = L.getTop();
|
||||
|
||||
if (nargs != 0) {
|
||||
L.raiseErrorStr("Expected no arguments", .{});
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(server.seat.focused_view) |view| {
|
||||
view.xdg_toplevel.sendClose();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
pub fn exit(L: *zlua.Lua) i32 {
|
||||
const nargs: i32 = L.getTop();
|
||||
|
||||
if (nargs != 0) {
|
||||
L.raiseErrorStr("Expected no arguments", .{});
|
||||
return 0;
|
||||
}
|
||||
|
||||
server.deinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue