Minor updates, breaking.

This commit is contained in:
2026-09-09 16:14:38 +01:00
parent c06bc3a933
commit 93d71d820a
5 changed files with 41 additions and 32 deletions
+12 -12
View File
@@ -6,7 +6,7 @@ type wm_state = {
mutable focus : Xcb.Types.Window.t;
workspaces : Kutu.Layout.workspace array;
mutable current : int;
screen : Kutu.Layout.rect;
screen : Decl.Types.rect;
}
let () =
@@ -14,22 +14,22 @@ let () =
let conn = Xcb.Connection.connect () in
let mrb = Mruby.Core.mrb_open in
let root = Xcb.Utils.get_root conn in
let _ = Xcb.Window.setup conn root in
let screen = Xcb.Window.setup conn root in
{
running = true;
conn;
mrb;
root;
focus = root;
workspaces = [| { ws_root = Kutu.Layout.Nothing; ws_fwindows = [||] } |];
workspaces =
[|
{
Kutu.Layout.ws_root = Kutu.Layout.Nothing;
Kutu.Layout.ws_fwindows = [||];
};
|];
current = 0;
screen =
{
Kutu.Layout.rect_x = 100;
Kutu.Layout.rect_y = 100;
Kutu.Layout.rect_width = 100;
Kutu.Layout.rect_height = 100;
};
screen;
}
in
@@ -61,9 +61,9 @@ let () =
let req = Xcb.Types.Events.Map_request.from ev in
let window = Xcb.Types.Events.Map_request.window req in
state.focus <- window;
state.workspaces.(state.current).ws_root <-
(*Kutu.Layout.ws_root state.workspaces.(state.current)) <-
Kutu.Layout.insert Kutu.Layout.Horizontal window
state.workspaces.(state.current).ws_root;
(Kutu.Layout.ws_root state.workspaces.(state.current)*)
Xcb.Window.map state.conn window;
Xcb.Window.setup_window state.conn window;
Xcb.Window.focus state.conn window;