mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
tags are like kinda done but not really, still need to switch focus
This commit is contained in:
parent
8dbaae8d03
commit
689b48acd7
5 changed files with 190 additions and 117 deletions
|
|
@ -64,10 +64,14 @@ pub fn close(L: *zlua.Lua) i32 {
|
|||
// ---@param x number x position for view
|
||||
// ---@param y number y position for view
|
||||
pub fn set_position(L: *zlua.Lua) i32 {
|
||||
std.log.debug("repositioning", .{});
|
||||
|
||||
const view_id: u64 = @intCast(L.checkInteger(1));
|
||||
const x: i32 = @intFromFloat(@round(L.checkNumber(2)));
|
||||
const y: i32 = @intFromFloat(@round(L.checkNumber(3)));
|
||||
|
||||
std.log.debug("position to set: ({d}, {d})", .{x, y});
|
||||
|
||||
const view: ?*View = if (view_id == 0) server.seat.focused_view else server.root.viewById(view_id);
|
||||
if(view) |v| {
|
||||
v.setPosition(x, y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue