mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 20:57:32 -04: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);
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@ fn handleNewXdgToplevelDecoration(
|
|||
_: *wl.Listener(*wlr.XdgToplevelDecorationV1),
|
||||
decoration: *wlr.XdgToplevelDecorationV1
|
||||
) void {
|
||||
std.log.debug("Request for decorations", .{});
|
||||
if(server.root.viewById(@intFromPtr(decoration.toplevel))) |view| {
|
||||
view.xdg_toplevel_decoration = decoration;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ pub fn setSize(self: *View, width: i32, height: i32) void {
|
|||
// --------- XdgTopLevel event handlers ---------
|
||||
fn handleMap(listener: *wl.Listener(void)) void {
|
||||
const view: *View = @fieldParentPtr("map", listener);
|
||||
std.log.debug("Mapping view '{s}'", .{view.xdg_toplevel.title orelse "(unnamed)"});
|
||||
|
||||
server.events.exec("ViewMapPre", .{view.id});
|
||||
|
||||
|
|
@ -222,8 +221,6 @@ fn handleRequestMove(
|
|||
) void {
|
||||
// const view: *View = @fieldParentPtr("request_move", listener);
|
||||
|
||||
std.log.debug("The clients should not be request moves", .{});
|
||||
|
||||
// server.cursor.moveView(view);
|
||||
// server.cursor.grabbed_view = view;
|
||||
// server.cursor.mode = .move;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue