Cleanup.
This commit is contained in:
+4
-7
@@ -16,12 +16,8 @@ let () =
|
||||
|
||||
(match startup_script with
|
||||
| Some s ->
|
||||
print_string s;
|
||||
print_endline " : Have something";
|
||||
Mruby.Core.mrb_load_string state.mrb (Mruby.Initial.initial_code s)
|
||||
| None ->
|
||||
print_endline "Nothing";
|
||||
Mruby.Core.mrb_load_string state.mrb (Mruby.Initial.initial_code ""));
|
||||
| None -> Mruby.Core.mrb_load_string state.mrb (Mruby.Initial.initial_code ""));
|
||||
Mruby.Core.error_check state.mrb;
|
||||
|
||||
if Xcb.Connection.flush state.conn <= 0 then exit 1;
|
||||
@@ -44,6 +40,7 @@ let () =
|
||||
Xcb.Window.focus state.conn window;
|
||||
Xcb.Window.move_to_bottom state.conn window;
|
||||
state.focus <- window;
|
||||
(* TODO: check if window wants to be floating and if so float it instead. *)
|
||||
let ws =
|
||||
match Hashtbl.find_opt state.workspaces state.current with
|
||||
| Some ws -> ws
|
||||
@@ -55,7 +52,7 @@ let () =
|
||||
ws.ws_root <-
|
||||
Some (Kutu.Layout.insert Kutu.Layout.Horizontal window ws.ws_root);
|
||||
List.iter
|
||||
(fun { Kutu.Layout.fw_window = window; fw_rect = rect } ->
|
||||
(fun { Kutu.Layout.wr_window = window; wr_rect = rect } ->
|
||||
Xcb.Window.reshape state.conn window rect)
|
||||
(Kutu.Layout.calculate state.screen ws.ws_root);
|
||||
Hashtbl.replace state.window_workspace window state.current
|
||||
@@ -89,7 +86,7 @@ let () =
|
||||
Hashtbl.remove state.window_workspace window;
|
||||
if ws_name = state.current then
|
||||
List.iter
|
||||
(fun { Kutu.Layout.fw_window = window; fw_rect = rect } ->
|
||||
(fun { Kutu.Layout.wr_window = window; wr_rect = rect } ->
|
||||
Xcb.Window.reshape state.conn window rect)
|
||||
(Kutu.Layout.calculate state.screen ws.ws_root)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user